[Bug 17026] New: [FO30] has-children() equivalence in failure cases

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17026

           Summary: [FO30] has-children() equivalence in failure cases
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.0
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


The specification for has-children() states:

The result of the function call fn:has-children($node) is defined to be the
same as the result of the expression fn:exists($node/child::node()).

However, this is only true in success cases. Examples of differences:

(a) if $node is not a node, the error code is XPTY0004 rather than XPTY0020

(b) if $node is a sequence of two nodes, the result is a type error rather than
true or false.

So the implication that a call on has-children can be statically rewritten in
this form is incorrect.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 10 May 2012 11:14:11 UTC