xsl-list
[Top] [All Lists]

Re: [xsl] problem with intersect in match pattern

2014-06-06 06:35:06

On 6-6-2014 12:44, Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de wrote:
Szabo, Patrick (LNG-VIE) patrick(_dot_)szabo(_at_)lexisnexis(_dot_)at 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).

Cheers,

Abel Braaksma
Exselt XSLT 3.0 streaming processor
http://exselt.net
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>