Justine Hlista
Usenet Archive
- Joined
- Mar 3, 2004
- Messages
- 1
- Reaction score
- 0
I'm using xalan-j_2_6_0 and trying to get an example from Michael Kay's book to work:
<xsl:template match="/">
<xsl:variable name="rainbow">
<color>red</color>
<color>blue</color>
<color>green</color>
</xsl:variable>
<xsl:for-each select="$rainbow/color">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:template>
Both XSLTC and XSLT generate errors when they encounter the XPath expression in the select attribute. I cannot get XSLTC or XSLT to accept any expression that qualifies a variable in a select statement.
Am I trying to do something that is strictly forbidden here? Am I misunderstanding what Michael Kay's example was supposed to do?
Any help is greatly appreciated!!
Justine
<xsl:template match="/">
<xsl:variable name="rainbow">
<color>red</color>
<color>blue</color>
<color>green</color>
</xsl:variable>
<xsl:for-each select="$rainbow/color">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:template>
Both XSLTC and XSLT generate errors when they encounter the XPath expression in the select attribute. I cannot get XSLTC or XSLT to accept any expression that qualifies a variable in a select statement.
Am I trying to do something that is strictly forbidden here? Am I misunderstanding what Michael Kay's example was supposed to do?
Any help is greatly appreciated!!
Justine