Re: [xsl] accessing paramters as node-sets

Subject: Re: [xsl] accessing paramters as node-sets
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Tue, 13 Jul 2004 16:19:25 -0600
Hi Marcus,

I'm assuming by passing in you are referring to passing in a parameter using the <xsl:with-param.../> child element of <xsl:apply-templates...> and <xsl:call-template...>? If so, once the variable has been converted to a node-set and passed as a parameter to another template then the need to convert it to a node-set doesnt exist because it already is a node-set.

Now if by passing in you are referring to the processor passing in the value from the command line or by creating a transformation process within your application code and passing it in through whatever mechanism is exposed to you to do this from your code-base (you didn't say what transformer you are using or what language/platform you are developing this with and there are to many possibilities to make a guess) there's a good chance that the processor already sees a node-set and therefore trying to convert it to a node-set again provides no value to you.

If you can provide more details as to which of the above solutions you are referring to, the processor you are using, and if necessary the development language and platform you are using to instantiate the transformation process then more help can be provided :)

Best regards,

<M:D/>

Marcus B. Irven wrote:

currently i'm accessing a xsl variable such as:

<xsl:variable name="test">
<some>xml</some>
</xsl:varialbe>

using exsl:node-set($test)

now I want to pass in the same xml as a paramter such as:

<xsl:param name="test2"/>

and then access it with exsl:node-set($test2) but it doesnt work.  Is this
possible?

Marcus

Current Thread