xsl-list
[Top] [All Lists]

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

2005-10-26 06:56:19
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 :-)

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--