[Bug 3086] fn:boolean and ordering mode unordered

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

           Summary: fn:boolean and ordering mode unordered
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: jens.teubner@in.tum.de
         QAContact: public-qt-comments@w3.org


The XQuery Candidate Recommendation states (Sect. 2.4.3):

"The effective boolean value of a sequence that contains at least one node and
at least one atomic value is nondeterministic in regions of a query where
'ordering mode' is unordered."

Most probably, this statement is based on the semantics of fn:boolean() to only
look into the *first* item of a heterogeneous sequence. However, my
understanding is that, even in a context where 'ordering mode' is unordered,
the order among items in a sequence (sequence order) is still well-defined. The
expression

  (<a/>, 42)

for example, will have the node as its first result item and an integer as its
second, regardless of the setting of 'ordering mode'. The above quote, IMHO, is
not compatible with the semantics of 'ordering mode'.

'Ordering mode' does affect sequence order at other occasions, e.g., when the
result sequence is formed from an XPath location step. Once the order of a
sequence is fixed, however, it is unaffected by 'ordering mode'.

Received on Wednesday, 5 April 2006 12:58:58 UTC