This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XPath 2.0: Conditional Expression (Was Re: XQuery 1.0 and XPath 2.0 Functions and Operators Version 1.0)
- To: <xsl-list at lists dot mulberrytech dot com>, "'Jim Melton'" <jim dot melton at acm dot org>
- Subject: RE: XPath 2.0: Conditional Expression (Was Re: [xsl] XQuery 1.0 and XPath 2.0 Functions and Operators Version 1.0)
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 7 Sep 2001 22:44:58 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Another XPath 2.0 requirement that doesn't seem to be present in the
> F&O WD is 2.2 "Must Provide a Conditional Expression". I imagined that
> conditional expressions would be supported with an operator, something
> like:
>
> boolean-expression ? true-expression : false-expression
>
> Is this functionality going to appear in a different document?
Yes. The F&O document is intended only to contain pure functions and
operators, that is things that evaluate all their operands/arguments and
then produce a result that depends on their values. (Admittedly it currently
contains some things that don't quite meet these criteria, e.g. "and" and
"or"). Constructs like "a/b" and "a[b]" and if-then-else don't fall into
this pattern, and will be described as part of the built-in semantics of the
language.
To save you guessing, the current thinking for the syntax of conditional
expressions is
if (condition) then expression-1 else expression-2
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list