|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: conditional declaretion of a variable
Hi, Variable has to be declared like this: <xsl:variable name="valueField"> <xsl:choose> <xsl:when test="@valueField"> <xsl:value-of select="@valueField"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="@field"/> </xsl:otherwise> </xsl:choose> </xsl:variable> Does this answer your question? sundar >>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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








