[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] problem with intersect in match pattern

Subject: Re: [xsl] problem with intersect in match pattern
From: "Abel Braaksma (Exselt) abel@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 6 Jun 2014 11:34:54 -0000

On 6-6-2014 12:44, Martin Honnen martin.honnen@xxxxxx wrote:
> Szabo, Patrick (LNG-VIE) patrick.szabo@xxxxxxxxxxxxx wrote:
>> <snip />
> I think you want
>   <xsl:variable name="var1" select="//desiredelement"/>
> to select the original elements and not to create a copy of element as
> you currently do.
>> <snip />
> Then the intersection should work.

The underlying reason that intersect didn't work in the previous example
is that it uses node-identity, as opposed to content-equality (as with
fn:deep-equal). Creating a copy of a node changes its node-identity and
"disconnects" it from the underlying document (an input document is
immutable just as variables are immutable).


Abel Braaksma
Exselt XSLT 3.0 streaming processor

Current Thread