W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2012

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

From: <bugzilla@jessica.w3.org>
Date: Thu, 10 May 2012 11:14:03 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-17026-523@http.www.w3.org/Bugs/Public/>

           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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:38 UTC