RE: [xsl] logical and, and logical or

Subject: RE: [xsl] logical and, and logical or
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 14 Sep 2006 18:48:11 +0100
> But tell me, really, was this what you were looking for? A 
> function as a replacement of an operator?

I suspect he was looking for an entry in the XPath 2.0 "Functions and
Operators" book. Generally, all the first-order operators in the language
have such an entry. Higher-order operators (such as "/", [], if/then/else)
do not, because they deliver results that aren't strictly functions of the
values of their arguments. Historically and+or were excluded for the same
reason, because in XPath 1.0 they had strict early-exit semantics [(a=0 or
10 div a) was guaranteed not to give a divide-by-zero error]. Arguably they
now have much the same semantics as other operators, in that you're allowed
to avoid evaluating arguments that aren't needed, but you're not required
to. However, no-one ever got round to adding them to F+O - and it's not
strictly necessary.

Michael Kay
http://www.saxonica.com/

Current Thread