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]

RE: Setting a global variable, or using a variable in place of provided XML


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


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