This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Converting a string to a node and changing the scope
- From: "James Shaw" <hertzsprrrung at hotmail dot com>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Wed, 12 Jun 2002 13:22:57 +0000
- Subject: [xsl] Converting a string to a node and changing the scope
- Reply-to: xsl-list at lists dot mulberrytech dot com
Two newbie questions:
1) I am passing a string as a parameter into a template. Can I treat the
string as if it were a reference to a node. e.g.
<xsl:template match="/">
<xsl:call-template name="foo">
<xsl:with-param name="mystring">rootNode/myNode</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="foo">
<xsl:param name="mystring"/>
<xsl:value-of select="conversionFunction($mystring)"/>
</xsl:template>
2) I realise that xsl:for-each will change the current scope. However, if I
wanted to call a template, but in a different scope, is there a proper way
of changing the scope?
Thanks in advance,
James Shaw
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list