Consider the following XML document: <test><!-- a --><somenode><!-- b --></somenode><!-- c --></test>
and let libxml2 evaluate the XPath expression "//comment()" on it. libxml2 returns node-set (a,c,b) instead of (a,b,c), that I would have expected. To be exact, "(//comment())[2]" gives singleton (c) instead of the expected (b). W3C's XPath recommendation indeed states, that predicates are to determine "the position of the node in the node-set ordered in document order if the axis is a forward axis" [1], which should be the case here. Don't hesitate to call me a fool for this stupid-looking question, I probably just got something terribly wrong, right? Marius [1] http://www.w3.org/TR/xpath.html#predicates _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
