This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Converting a string to a node and changing the scope


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]