[xsl] Re: Converting <xml> StyleSheet param contents into a node set?

Subject: [xsl] Re: Converting <xml> StyleSheet param contents into a node set?
From: Jacquo Johnson <genxgeek@xxxxxxxxx>
Date: Wed, 17 Aug 2005 00:38:21 -0600
Well, I spoke too soon on this.  For some reason the returned
nodeset() or lack there of won't let me traverse the tree accordingly:

...
Stylesheet: ( Filter=<Node><Value/>HI</Value></Node> )
...
<xsl:param name="Filter" select="0" />

<xsl:variable name="rtf">
  <xsl:value-of select="$Filter" disable-output-escaping="yes"/>
</xsl:variable>
<xsl:variable name="rtf2" select="xalan:nodeset($rtf)" />

<xsl:for-each select="($rtf2)/Value">		<!-- Not returning Value here?? -->
   <xsl:element name="IncomingValue">
      <xsl:copy-of select="."/>
   </xsl:element>
</xsl:for-each>

Does anybody have an idea as to what I'm doing wrong here?

Thanks in advance!

On 8/17/05, Jacquo Johnson <genxgeek@xxxxxxxxx> wrote:
> Looks like this works (since I'm pigeon holed using xalan)..
> ...
> <xsl:variable name="rtf">
>    <xsl:value-of select="$Filter" disable-output-escaping="yes"/>
> </xsl:variable>
>
> <xsl:copy-of select="xalan:nodeset($rtf)" />
> ...
>
> Is there a better way to do this than with xalan:nodeset() or any
> equivalent node-set()/nodeset() entension function?
>
> --
> On 8/16/05, Jacquo Johnson <genxgeek@xxxxxxxxx> wrote:
> > HI all, can somebody tell me how I can pass <xml> contents into a
> > stylesheet param and then convert that <xml> contents into a nodeset?
> >
> >
> > Stylesheet: ( Filter=<Node><Whatever/></Node> )
> > ...
> > <xsl:param name="Filter" select="string('NULL')" />
> >
> >    <xsl:copy-of select="$Filter"/>
> > ...
> > Output:
> >    &lt;Node&gt;&lt;Whatever/&gt;&lt;/Node&gt;
> >
> > However, I want to turn the xml contents above into a node set that I
> > can later use in the transform.  Is that possible (is there something
> > other than using CDATA)?
> >
> > Any information would be greatly appreciated.

Current Thread