[Bug 29587] New: [XP31] Numeric literals with leading or trailing decimal point

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

            Bug ID: 29587
           Summary: [XP31] Numeric literals with leading or trailing
                    decimal point
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The XPath/XQuery grammar allows numeric literals to have a leading or trailing
decimal point, for example

2. + .5

is a valid query that returns 2.5

XPath/XQuery defines the semantics of a numeric literal by reference to the
rules for casting from string to number.

The rules for casting from string to number are defined in terms of the
XSD-defined mapping from lexical space to value space.

But in XSD, the lexical space for xs:decimal, xs:double, and xs:float does not
allow a leading or trailing decimal point.

For example, XPath defines decimal-literal with the pattern

("." [0-9]+) | ([0-9]+ "." [0-9]*)

while XSD 1.1 defines the lexical space of xs:decimal as

(\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Saturday, 23 April 2016 07:28:48 UTC