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

Re: [xsl] Dynamicaly applying templates from a node-set containing xpath values - with msxml parser


Subject: Re: [xsl] Dynamicaly applying templates from a node-set containing xpath values - with msxml parser
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Wed, 26 Oct 2005 15:56:19 +0200

Hi Matthieu,

I have not the time to look at the function, but

> I think it is because of the context node, which is the matched <xpath>
node
> within the for-each element,

This would be easily tested by combining:
> <xsl:variable name="var" select="'/foo/@bar'"/>
> <xsl:value-of select="dyn:evaluate(.,$var)"/>

With

> <xsl:for-each select="msxsl:node-set($NodeSetXpathNode)/xpath">
>        <xsl:variable name="xpathValue" select="."/>
>        <xsl:apply-templates select="dyn:evaluate(.,$xpathValue)"/>
> </xsl:for-each>

Giving:
<xsl:for-each select="msxsl:node-set($NodeSetXpathNode)/xpath">
  <xsl:variable name="var" select="'/foo/@bar'"/>
  <xsl:value-of select="dyn:evaluate(.,$var)"/>
</xsl:for-each>

If this does not work, then your hypothetis might be correct, but if
it does work, then it will have to be something else. It might then be
the expressions, or it might be something else entirely. You could
perhaps also iterat over a nodeset which is not made using
msxsl-extension, and see what happens here.

These are just a couple of thoughts that might help narrow down your problem.

Regards,
Ragulf Pickaxe :-)


Current Thread