dkumarx / ajaxslt

Automatically exported from code.google.com/p/ajaxslt
Other
0 stars 0 forks source link

Duplicates not pruned from node-sets #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The XPath spec says that a node-set is "an unordered collection of nodes
without duplicates". In certain situations, we're not removing duplicates
in the node-sets. If I'm not mistaken, the following two expressions should
return identical node-sets:

  /descendant-or-self::*/A

  /descendant::A/../A

However, the second expression returns duplicates in its node-set (example
page:
http://code.google.com/p/jsprofile/source/browse/trunk/test/functional/ajaxslt/n
ews.google.com.html)

We can take a look at how other engines (i.e. cybozu) detect duplicates;
comparing nodes using "===" is non-performant.

Original issue reported on code.google.com by hbc...@gmail.com on 26 Jun 2008 at 2:10