Subject: Re: [xsl] Using "except" where some nodes are copies (not the original)? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Thu, 29 Dec 2011 09:57:01 +0000 |
Michael Kay Saxonica
Hi Folks,
How do I do set subtraction where some of the nodes in the two sets may be copies (not originals)?
Please allow me to explain.
Consider this XML document:
<Test> <A/> <B/> <C/> </Test>
Set<Test> as the context node.
This operation:
(A, B,, C) except (B, C)
returns:
(A)
Nice.
Now, make a copy of B and store it into a variable:
<xsl:variable name="B" as="element(B)"> <xsl:copy-of select="B" /> </xsl:variable>
Run the same operation, but using the variable:
(A, B, C) except ($B, C)
Returns:
(A, B)
Ouch!
I don't want that behavior. I want:
(A, B, C) except ($B, C)
to return:
(A)
How do I achieve the behavior I desire?
That is, how do I do set subtraction where some of the nodes in the two sets may be copies?
/Roger
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Using "except" where some, Dimitre Novatchev | Thread | [xsl] Boolean logic, davep |
Re: [xsl] Using "except" where some, Dimitre Novatchev | Date | [xsl] Boolean logic, davep |
Month |