RE: ORA-FO-CAST-BOOLEAN 15.1.4 fn:boolean

Thank you for your comment.  The WGs discussed the semantics of
fn:boolean and decided to clarify the wording to 

reflect the fact that fn:boolean computes the effective boolean value.
The revised wording and a note describing how the semantics differ from
'cast as boolean' will appear in the next version of the document.

All the best, Ashok 

________________________________

From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Stephen Buxton
Sent: Monday, June 30, 2003 7:18 AM
To: public-qt-comments@w3.org
Subject: ORA-FO-CAST-BOOLEAN 15.1.4 fn:boolean 

 

Functions and Operators, Section 15.1.4 fn:boolean says "If $srcval is
an atomic value, then the function returns the same value as returned by
the expression cast as xs:boolean ($srcval) with the one exception
described below. This exception is for compatibility with [XPath 1.0].
Specifically, it returns false if $srcval is: .... " 
It then lists 4 possibilities. What is the "one exception" ? 

Possibly the exception is the second bullet - "The singleton xs:string
value " <Thesingletonxs:stringvalue> ". (the zero-length string). The
expression cast as xs:boolean ($srcval) returns false if $srcval is "0"
and true if $srcval is "1".". 
Why are we comparing what fn:boolean does with the zero-length string as
input vs what cast as xs:boolean does with "0" or "1" as input ? 

Suggest: if there is only one difference between fn:boolean and cast as
xs:boolean, then either describe the behaviour fully in one section and
just mention the exception in the other, or describe the behaviour
fully, using the same format and notation, in both sections and note the
exception in both sections.

Received on Sunday, 21 September 2003 14:41:11 UTC