Oxygen XML Editor
 
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] What does the phrase "duplicates removed" mean precisely?


Subject: RE: [xsl] What does the phrase "duplicates removed" mean precisely?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 1 Feb 2006 03:38:37 -0000

> 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
http://www.saxonica.com/


Current Thread
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor