xsl-list
[Top] [All Lists]

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

2006-02-01 03:01:47
On 2/1/06, Jay Bryant <jay(_at_)bryantcs(_dot_)com> 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>