This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1757 - [FS] editorial: 7.2.4 The fn:boolean function
Summary: [FS] editorial: 7.2.4 The fn:boolean function
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Michael Dyck
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-19 21:47 UTC by Michael Dyck
Modified: 2008-08-18 05:51 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-07-19 21:47:25 UTC
7.2.4 The fn:boolean function

"a sequence of one or more nodes"
    Actually, F+O 15.1.1 indicates that a sequence consisting of a node
    followed by atomic values should not raise a type error, whereas this
    rule would reject it.

"or a singleton value of type ..."
    Missed xs:boolean.
Comment 1 Michael Rys 2005-07-19 22:18:10 UTC
F+O describes the dynamic semantics. The static semantics is designed to 
disallow any heterogeneous node/atomic value sequence.

Best regards
Michael (speaking for myself, but also as the original proposer of the 
semantics)
Comment 2 Jerome Simeon 2006-03-29 22:26:56 UTC
Fixed the second comment, without changing the intended semantics of fn:boolean.
- Jerome
Comment 3 Michael Dyck 2006-10-06 00:03:17 UTC
"The fn:boolean function as described in the [Functions and Operators] document takes an empty sequence, a sequence of one or more nodes, or a singleton value of type .... All other values are illegal."
    No, fn:boolean <em>as described in the F+O doc</em> handles a wider set of
    inputs. If you want the static typing to accept a narrower set of types,
    fine, but don't make it sound like they're in agreement. 

    Also, the list of singleton types is missing xs:anyURI.

    Also, NodeType+ probably isn't what you want. See Bug 1747, comment #3.

    
Comment 4 Michael Dyck 2008-08-18 05:49:11 UTC
(In reply to comment #3)
> "The fn:boolean function as described in the [Functions and Operators]
> document takes an empty sequence, a sequence of one or more nodes, or a
> singleton value of type .... All other values are illegal."
>     No, fn:boolean <em>as described in the F+O doc</em> handles a wider
>     set of inputs. If you want the static typing to accept a narrower set
>     of types, fine, but don't make it sound like they're in agreement. 

I have clarified the distinction between the dynamic and static type
restrictions.

>     Also, the list of singleton types is missing xs:anyURI.

The Rec fixed this in the inference rule, but not in the preceding prose.

>     Also, NodeType+ probably isn't what you want. See Bug 1747, comment #3.

Changed to [[ node()+ ]]_sequencetype.
Comment 5 Michael Dyck 2008-08-18 05:51:07 UTC
These remaining points have been entered as FS erratum E026, and the fixes
have been committed to the source files for the next edition of the FS
document.  Consequently, I'm marking this issue resolved-fixed, and closed.