xsl-list
[Top] [All Lists]

conditional declaretion of a variable

2003-04-17 04:46:20

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



<Prev in Thread] Current Thread [Next in Thread>