xsl-list
[Top] [All Lists]

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

2006-01-31 17:30:10
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.

Then, to process just one of the duplicate nodes, I could do something like:

<xsl:for-each select="SomeTag[not(following::SomeTag = .]">
  <!-- Do something here -->
</xsl:for-each>

Make sense? If not, let us know.

And welcome to XSL and the list.

Jay Bryant
Bryant Communication Services

----- Original Message ----- 
From: "Mark Wilson" <drmark(_at_)tlcdelivers(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Tuesday, January 31, 2006 7:51 AM
Subject: [xsl] What does the phrase "duplicates removed" mean precisely?


In reading Michael Kay's XPath 2.0, I frequently encountered the phrase,
"...returned with no duplicates...". I checked the FAQ mantained by Dave
Pawson under both XSLT Terminology -- where "duplicates" is used to define
the term "Node Set" -- and under XSL Frequently Asked Questions where
"duplicates" has its own heading. From that reading, I am all but
convinced
that "duplicates" refers to the (I cannot recall the correct XML term)
content text demarked by a starting and ending XML element pair, as in

    <SomeTag>This is the text</SomeTag>

Is this correct, or is my understanding imperfect? Are there any other
kind
of "duplicates" removed?

Thanks,
Mark


--~------------------------------------------------------------------
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>
--~--




--~------------------------------------------------------------------
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>
--~--