[Bug 3085] fn:boolean: FS, F&O and XQuery contradict

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3085

           Summary: fn:boolean: FS, F&O and XQuery contradict
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: jens.teubner@in.tum.de
         QAContact: public-qt-comments@w3.org


Citing from the XQuery F&O document (15.1.1)

" fn:boolean($arg as item()*) as xs:boolean
  ...
  If $arg is a sequence whose first item is a node, fn:boolean returns true.",

that information contradicts the static type semantics of the fn:boolean()
function (XQuery FS, 7.2.4) that demands the type

  (empty | node+ | xs:boolean | xs:string | xdt:untypedAtomic | fs:numeric)

for the argument of fn:boolean. Apparently, a mixed sequence of nodes and atoms
is allowed by the former (only the first item must be a node), while the latter
disallows such sequences.

Received on Wednesday, 5 April 2006 12:49:01 UTC