[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: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Wed, 1 Feb 2006 10:01:47 +0000
what does welch mean
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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-2007 All Rights Reserved.