W3C home > Mailing lists > Public > www-xpath-comments@w3.org > October to December 1999

lack of if/else?

From: Mark D. Anderson <mda@discerning.com>
Date: Sat, 13 Nov 1999 15:30:05 -0800
To: www-xpath-comments@w3.org
Message-ID: <1909167208.942507005@MDAXKE>
i'm curious as to the reason in omitting if-else from xpath?

i might note that xslt defers to xpath for most of its operators,
but it felt obliged to add if else in (or rather, if and choose).

since the boolean operators (and, or, not) are stricly boolean,
it is not possible to use c-style tricks to simulate if-else.

in some situations it is possible to achieve if-else semantics
by use of test expressions (using '[ ... ]') and node-set union
(the '|' operator).

but that doesn't allow for using if-else within an expression.

-mda
Received on Saturday, 13 November 1999 18:30:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:53 GMT