[4suite] About xml_xpath and node sets

Luis Miguel Morillas morillas at gmail.com
Sun Jun 24 23:38:28 MDT 2007


In http://cvs.4suite.org/viewcvs/Amara/test/bindery/pis_comments.py
you use list index (node set index) in test methods:

self.assertEqual(doc.xml_xpath(u'//node()')[0].nodeType, Node.COMMENT_NODE)

But if node-set are "unordered collection of nodes without duplicates"
[http://www.w3.org/TR/xpath], you can get wrong results, don't you?

See these examples:
http://livingpyxml.python-hosting.com/wiki/TestAmara:2007_06_08 with
different results against the same source.


Saludos,

--

Luis Miguel


More information about the 4suite mailing list