[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

2.7.11 Conditionals Issue if-when-unify

Subject: 2.7.11 Conditionals Issue if-when-unify
From: Francois Belanger <francois@xxxxxxxxxxx>
Date: Wed, 23 Dec 98 12:10:49 -0500
if when
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.