[xsl] conditional declaretion of a variable

Subject: [xsl] conditional declaretion of a variable
From: florian <csshsh@xxxxxxxxxxxxxxx>
Date: 17 Apr 2003 13:46:20 +0200
hi!

im wondering why something like this doesnt work:

<xsl:variable name="field" select="@field" />

<xsl:choose>
  <xsl:when test="@valueField">
    <xsl:variable name="valueField" select="@valueField" />
  </xsl:when>
  <xsl:otherwise>
    <xsl:variable name="valueField" select="@field" />
  </xsl:otherwise>
</xsl:choose>

<xsl:value-of select="$field" />

i would use the valueField variable for a value attribute
of a option element (html)..

thanks!

ciao!
florian



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


Current Thread