[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 2.7.11 Conditionals Issue if-when-unify
I think they sould become one and I'd go with xsl:if (with added xsl:else-if and xsl:else) as often we need an if/else statement which can be shorter and more readable than the equivalent xsl:choose. Example: <xsl:choose> <xsl:when test=".[last-of-any()]"><xsl:value-of select="@name"/></xsl:when> <xsl:otherwise><xsl:value-of select="@name"/>,</xsl:otherwise> </xsl:choose> Would become (but as I type this I realize it might make parsing difficult): <xsl:if test=".[last-of-any()]"><xsl:value-of select="@name"/></xsl:if> <xsl:else><xsl:value-of select="@name"/>,</xsl:else> Anyhow, I would not mind keeping only xsl:choose, but not both. I find an xsl:if without an xsl:else (which means rewriting the whole thing as a xsl:choose because I need to add an else) not intuitive. Francois Belanger Sitepak, Bringing Internet Business into Focus http://www.sitepak.com 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
|