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

Subject: Re: [xsl] What does the phrase "duplicates removed" mean precisely?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 1 Feb 2006 23:47:58 GMT
>  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
________________________________________________________________________

Current Thread