[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: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 6 Jun 2014 10:44:09 -0000

Szabo, Patrick (LNG-VIE) patrick.szabo@xxxxxxxxxxxxx wrote:

I have the following variable

<xsl:variable name="var1">
         <xsl:copy-of select="//desiredelement"/>
</xsl:variable>

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.


Afterwards I'd like to match any element that matches the xpath "//desiredelement" i.e. is in var1.

<xsl:template match="*[. intersect $var1]">
...
</xsl:template>

...which doesn't work at all.

Then the intersection should work.



Current Thread
Keywords