This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Setting a global variable, or using a variable in place of provided XML
- From: Jarno dot Elovirta at nokia dot com
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 25 Apr 2002 08:50:20 +0300
- Subject: RE: [xsl] Setting a global variable, or using a variable in place of provided XML
- Reply-to: xsl-list at lists dot mulberrytech dot com
Heppa,
> I'd like to do something similar to -
>
> <xsl:choose>
> <xsl:when test="//template/bodyfont/@size = 'small'">
> <xsl:variable name="bodyfontsize" select="'2'"/>
> </xsl:when>
> <xsl:otherwise>
> <xsl:variable name="bodyfontsize" select="'4'"/>
> </xsl:otherwise>
> </xsl:choose>
<xsl:variable name="bodyfontsize">
<xsl:choose>
<xsl:when test="//template/bodyfont/@size = 'small'">2</xsl:when>
<xsl:otherwise>4</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Cheers,
Jarno
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list