W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2004

Re: [XSLT 2.0] Why doesn't XSLT have an <xsl:else> element?

From: Oliver Becker <obecker@informatik.hu-berlin.de>
Date: Fri, 2 Apr 2004 16:02:15 +0200 (MEST)
Message-Id: <200404021402.i32E2FID007859@mail.informatik.hu-berlin.de>
To: public-qt-comments@w3.org, dnovatchev@yahoo.com

> > Is there a good reason for the absence of <xsl:else>?
> Yes and you could have tried to think about it. How would you solve the
> "dangling else" problem?


since the W3C doesn't want to add xsl:else, this discussion might be
pointless. However: requiring that xsl:else must always follow immediately
an xsl:if is IMHO not more complicate than requiring that xsl:param must
always come first within a template.

Moreover, there is no dangling else here:

if x then (if y then a else b)
<xsl:if test="x">
   <xsl:if test="y">a</xsl:if>

if x then (if y then a) else b
<xsl:if test="x">
   <xsl:if test="y">a</xsl:if>
Oliver Becker

|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@informatik.hu-berlin.de             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
Received on Friday, 2 April 2004 09:02:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:56 UTC