[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: What does the phrase "duplicates removed" mean pr

Subject: RE: What does the phrase "duplicates removed" mean precisely?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 1 Feb 2006 03:38:37 -0000
occurrences mean
> Now, if I had a structure like this:
> <root>
>  <SomeTag>This is the text</SomeTag>
>  <SomeTag>This is the text</SomeTag>
> </root>
> I'd have a duplicate.

No, when the spec speaks of duplicates it's generally talking about node
identity, not content. People sometimes use the phrase "two nodes with the
same identity" - I try to avoid that, because you've then got one node, not
two. A sequence contains duplicates if it contains the same node twice: for
example, with <root> in the above example as the context node, the sequence
(child::SomeTag, descendant::SomeTag) contains four items, namely two
occurrences of each of the two SomeTag nodes. If you replace the ","
operator with "|", duplicates are eliminated, and you end up with one
occurrence of each of the two SomeTag elements.

Michael Kay

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.