Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: David Carlisle <davidc@--------->
To:
Date: 2/2/2006 1:56:00 AM
>  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?

No you are not wrong. Well technically in xslt2 nodes can live outside
of a tree: if you go
<xsl:variable name="x" as="element()">
 <foo/>
</xsl:variable>
then $x is a free standing element with no parent and no children, but
you can't get such a thing by parsing a real xml file.
I just mention it here because the point is that if you do that again
<xsl:variable name="y" as="element()">
 <foo/>
</xsl:variable>
then again $x and $ y have equal values ($x=$y and deep-equal($x,$y) are
both true) but are different nodes $x is $y is false.

But in real xml files same node means same bit of the file, yes.
XSLT1 has strict rules that if you load the same URI twice then you get
the same nodes (for all the nodes in the tree), XSLT2 has the same rule
(although there is some discussion of having an option to relax this
rule) and allow a system to tread loading teh same file twice the same
way as it would tread loading two copies of the same file, which would
produce document nodes with different identities (but otherwise
identical structure)

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent