W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2009

[Bug 6346] New: fn:number() example

From: <bugzilla@wiggum.w3.org>
Date: Sat, 03 Jan 2009 16:37:08 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-6346-523@http.www.w3.org/Bugs/Public/>


           Summary: fn:number() example
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org

The second example for fn:number() (section 14.4.1) is:

fn:number($item2) returns NaN.

Now $item2 (scroll up to the start of section 14) is bound to an element of the

    <description> ... </description>
    <price> ... </price>

Since we are told that quantity is typed as xs:decimal, we must infer that this
element is schema-validated, and it therefore seems highly likely that the
line-item element would be defined with element-only content. In this situation
I believe number() should fail with a type error; because although number()
itself is resilient to casting errors, the atomization of the argument is done
under the function calling rules and will fail in the case of element-only

I think it would be better to use a different example, say
number($item1/description) (having given this element some non-numeric

Configure bugmail: http://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 Saturday, 3 January 2009 16:37:18 UTC

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