Hello,

I have a document that looks like this:
<data><message/></data>

I would expect XPath '/data/message/ancestor-or-self::*' to return three nodes: 
document node (the node with type XML_DOCUMENT_NODE), 'data' node (the root 
node) and 'message' node. I don't get the document node though.

Is it a bug or is it correct? What I found about root and document nodes was 
quite confusing, so I am not sure.

Anyway, it could be fixed in xmlXPathNodeCollectAndTest for NODE_TEST_ALL case 
to include document node as well as element nodes. And then I had to fix also 
comparing the nodes for document order (having document node always before any 
other node). And there would be probably more places, that would need some fix 
for document node.

Vojtech
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to