Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicates not pruned from node-sets #25

Open
GoogleCodeExporter opened this issue Apr 11, 2015 · 0 comments
Open

Duplicates not pruned from node-sets #25

GoogleCodeExporter opened this issue Apr 11, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 26 Jun 2008 at 2:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant