W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2002

RE: Why don't we have "xsl:continue" or "xsl:break" element?

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 7 Aug 2002 12:22:36 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453DA7F@daemsg02.software-ag.de>
To: Tuanjie Tong <tongtj@yahoo.com>, public-qt-comments@w3.org

> We do have "xsl:for-each" and "xsl:if" elements. Why
> cannot we have "xsl:continue" or "xsl:break" element?
> It's so inconvenient without such element cooperating
> with "xsl:for-each" and "xsl:if" elements. 

The instructions you propose would only make sense if <xsl:for-each> were
executed sequentially, that is, if the n'th node is always processed before
the (n+1)th. But the semantics of XSLT are non-sequential; the nodes
selected by xsl:for-each can be processed in any order, or in parallel.
Therefore xsl:break would not make sense.

You can always achieve the same effect by replacing the xsl:for-each with a
recursive template call.

Michael Kay
Software AG
Received on Wednesday, 7 August 2002 06:22:43 UTC

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