Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: andrew welch <andrew.j.welch@--------->
To:
Date: 2/1/2006 12:01:00 PM
On 2/1/06, Jay Bryant <jay@xxxxxxxxxxxx> wrote:
> Hi, Mark,
>
>  <SomeTag>This is the text</SomeTag>
>
> wouldn't be a duplicate, as it is a single element.
>
> 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.

Hi Jay,

In this instance "duplicates" is being referred to in the sense of a
Set - a Set will by definition never contain two of the same item.  In
your example the nodes have the same element name and value, but they
are different nodes - generate-id() will produce a different value for
each.

If you selected the same nodes twice eg
select="/root/SomeTag|/root/SomeTag" then the assembled Set will still
only contain the same nodes as if you had selected them once eg
select="/root/SomeTag" or 100 times - the duplicates (or nodes with
the same generate-id()) never get added (or are removed depending on
your perspective).

cheers
andrew


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent