Hi,<div><br></div><div>Using xuriella to perform the identity transform fails when there are empty elements (e.g. "<BasicDefinitions/>") in the source document.  I believe the problem is in normalize-text-nodes! which doesn't check to see if there are any children before trying to iterate over them.  This seems to trigger an assertion error in sbcl.</div>
<div><br></div><div><div>XURIELLA> (apply-stylesheet #p"/usr/src/discworld/xslt/identity.xsl" "<root>abc</root>")</div><div>"<?xml version=\"1.0\" encoding=\"UTF-8\"?></div>
<div><root>abc</root>"</div><div>XURIELLA> (apply-stylesheet #p"/usr/src/discworld/xslt/identity.xsl" "<root></root>")</div></div><div><div>The value NIL is not of type VECTOR.</div>
<div>   [Condition of type TYPE-ERROR]</div><div><br></div><div>Restarts:</div><div> 0: [RETRY] Retry SLIME REPL evaluation request.</div><div> 1: [ABORT] Return to SLIME's top level.</div><div> 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" RUNNING {CA2E459}>)</div>
<div><br></div><div>Backtrace:</div><div>  0: (CXML-STP-IMPL::NORMALIZE-TEXT-NODES! #.(CXML-STP:ELEMENT #| :PARENT of type DOCUMENT |# :LOCAL-NAME "root"))</div><div>  1: ((SB-PCL::FAST-METHOD XPATH-PROTOCOL:CHILD-PIPE-USING-NAVIGATOR ((EQL :DEFAULT-NAVIGATOR) CXML-STP:ELEMENT)) ..)</div>
<div>  2: ((LAMBDA (XPATH::NODE XPATH::STARTING-NODE)) #.(CXML-STP:ELEMENT #| :PARENT of type DOCUMENT |# :LOCAL-NAME "root") #.(CXML-STP:ELEMENT #| :PARENT of type DOCUMENT |# :LOCAL-NAME "root"))</div>
<div>  3: ((LAMBDA (XPATH:CONTEXT)) #<XPATH:CONTEXT {C750F39}>)</div></div><div><br></div><div><br></div><div>Simple fix is attached.</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br>
</div><div>Cheers,</div><div>Andy<br clear="all"><br>
</div>