[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: "Mark Wilson" <drmark@xxxxxxxxxxxxxxx>
Date: Wed, 1 Feb 2006 08:44:34 -0500
what does this phrase mean
Michael,
Your example is quite clear, but raises the issue of "what is identity?", a problem I also had after a careful reading of David's answer. Looking at your (C,D,E, D,E,E) example, my naive definition would be that "node identity is determined by a selected node's location within the source tree -- one node is identical to another, and thus is a duplicate, if they both shared the same location in the source tree". Or do I still have it wrong?
Mark


----- Original Message ----- From: "Michael Kay" <mike@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, January 31, 2006 10:28 PM
Subject: RE: What does the phrase "duplicates removed" mean precisely?



When an operation like a path expression or a union is defined to return a
sequence of nodes with duplicates removed, this simply means that you won't
get the same node appearing twice in the sequence. For example, if element A
has four children B, C, D, and E (in that order) then the path expression
child::*/following-sibling::* selects a sequence containing (C, D, E),
rather than (C, D, E, D, E, E) which is what you would get if duplicates
were not removed. This depends on the concept that nodes have an individual
identity. Nodes are duplicates if they have the same identity - the name and
value/content of the node are irrelevant.


Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: Mark Wilson [mailto:drmark@xxxxxxxxxxxxxxx]
Sent: 31 January 2006 13:52
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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.