Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] What does the phrase "duplicates removed" mean precisely? [Thread Next] Re: [xsl] What does the phrase "duplicates removed" mean precisely?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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
