[cxml-devel] Bugs when working with document nodes

David Lichteblau david at lichteblau.com
Mon Aug 28 09:10:51 UTC 2006


Quoting Sunil Mishra (smishra at sfmishras.com):
> clone-node is sort of working. It looks like it is making all the
> attributes that had previously been implicit, explicit. They are all
> being output in the svg element after cloning the document.
> 
> Also note that I'm still getting xlink=.... rather than xmlns:xlink=....
> in the cloned document. This does not happen when I output the original
> document.

Oops, I am losing faith in the DOM test suite...  Attribute nodes got
imported with some slots missing, it should have caught that.  Thank you
for the report.

Fix checked in; I am now getting the exact same output:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <rect fill="black" height="10" id="default-node-shape" stroke="blue" width="60"></rect>
  </defs>
</svg>

for all of these:

(dom:map-document (cxml:make-octet-stream-sink *standard-output*)               
                  /d                                                            
                  :include-doctype :canonical-notations)

(dom:map-document (cxml:make-octet-stream-sink *standard-output*)               
                  (dom:clone-node /d t)                                         
                  :include-doctype :canonical-notations)

(dom:map-document (cxml:make-namespace-normalizer                               
                   (cxml:make-octet-stream-sink *standard-output*))             
                  /d                                                            
                  :include-doctype :canonical-notations)

(dom:map-document (cxml:make-namespace-normalizer                               
                   (cxml:make-octet-stream-sink *standard-output*))             
                  (dom:clone-node /d t)                                         
                  :include-doctype :canonical-notations)



Phew. :-)

d.



More information about the cxml-devel mailing list