xsl-list
[Top] [All Lists]

Re: <xsl:if> and <xsl:else>?

2003-12-15 06:50:29
Actually I use <xsl:choose> to accomplish that
That's what it is there for.

but maybe there is a shorter way to do it,
xsl:choose has one child for the if bit and one for the else, it's
hard to imagine an xml syntax that would be _much_ shorter.

In xslt2 draft you can do more conditionals in xpath rather than xslt
<xsl:value-of if (a=b) then c else d"/>
which _is_ shorter.

David


-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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



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