[xsl] Node-List in Variables

Subject: [xsl] Node-List in Variables
From: "Hayk, Matthias" <Matthias.Hayk@xxxxxxxxxx>
Date: Fri, 2 May 2003 11:00:59 +0200

i want to tokenize a string, delimited  with a special character, into its
tokens and want this tokens to be a result-tree which i can handle with an

the first xsl:variable call the template tokenizer which creates the
t1-elements recursivly for all string elements (a, b and c).
i would expect that the variable tlist contains
<t1>a</t1><t1>b</t1><t1>c</t1> which i then want to work on with the
xsl:for-each, but the xslt-processor gives the error that the expression in
xsl:for-each must evaluate to a node-set. if i use the ms-xslt-nodeset
function i get only one node which contains the textvalues of the elements (
in my example it containt abc). so it seems, that tlist only contains a

any idea what is wrong and how i can achieve my goal?


<xsl:variable name="tlist">
	<xsl:call-template name="tokenizer">
		<xsl:with-param name="tokenstr" select="a|b|c|"/>

<xsl:for-each select="$tlist">
	<xsl:value-of select="."/>

<xsl:template name="tokenizer">
	<xsl:param name="tokenstr"/>
	<xsl:variable name="akttoken"
	<xsl:if test="string-length($akttoken) &gt; 0">
		<!-- Ist noch nen Token da -->
		<xsl:element name="t1">
			<xsl:value-of select="$akttoken"/>
		<xsl:call-template name="tokenizer">
			<xsl:with-param name="tokenstr"

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread