Re: [xsl] alternative to msxsl:node-set($variable)

Subject: Re: [xsl] alternative to msxsl:node-set($variable)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 10 Jan 2001 17:02:24 GMT
> it looks like using "msxsl:node-set($variable)" is what we need, but
> our product is stuck with the May 2000 msxml parser, so we can't use it.
> We'll upgrade the parser eventually, but we can't do it now...

The analogue of msxml:node-set($variable) in the earlier pre-releases of
MSXML3 was $variable. These releases implictly coerced a result tree to
a node set if needed. This implicit coercion was removed in favour of 
forcing users to use an extension function in order to make the system
conform to the spec.

But either way it won't help your problem, There is no way in XSL to
evaluate a string as an Xpath. The only system that I know that provides
this feature is saxon with saxon:evaluate.

Otherwise you have to do two passes, using the value of ActionPath
you first _generate_ a stylesheet with an appropriate 
<xsl:for-each select=
then you apply this generated sheet to your data.

> It seems like our problem is that we've got a result tree fragment in our
> ActionPathVar when what we need is a node-set.

No your ActionPathVar is set with an xsl:variable using a select
attribute, so is _not_ a result tree fragment, it is (in this case)
a node set consisting of the node ActionPath.

Your problem is that 

<xsl:for-each select="$ActionPathVar">

selects the node ActionPath not the node which would be selected by
evaluating the string value of ActionPath as an XPath.


This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit

 XSL-List info and archive:

Current Thread