<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29863</bug_id>
          
          <creation_ts>2016-09-22 19:41:11 +0000</creation_ts>
          <short_desc>[FO31] Is there a constructor function for xs:numeric?</short_desc>
          <delta_ts>2016-12-16 19:55:16 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127506</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-22 19:41:11 +0000</bug_when>
    <thetext>Is there a constructor function for xs:numeric?

The intro to section 18 says:

Constructor functions are defined for all user-defined named simple types, and for most built-in atomic, list, and union types. The only named simple types that have no constructor function are those that have no instances other than instances of their derived types: specifically, xs:anySimpleType, xs:anyAtomicType, and xs:NOTATION.

which would suggest yes (unless one argues that xs:numeric is neither a user-defined type nor a built-in type).

But no constructor function is listed in 18.4; constructors for all other types in the xs namespace are explicitly enumerated.

Although there&apos;s little practical use for the function, consistency really demands that it exists, and we should therefore list it in 18.4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127507</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-22 19:46:00 +0000</bug_when>
    <thetext>We have a couple of test cases that assume a constructor function for xs:numeric exists, and no-one has challenged them; so I think the answer is that the function does exist and we should list it in 18.4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127570</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-27 21:33:41 +0000</bug_when>
    <thetext>The WG agreed that a constructor function exists and should be documented.

The WG also asked the editor to add a note explaining the somewhat counter-intuitive behaviour whereby the result of xs:numeric() applied to a string is always an xs:double irrespective of the lexical form of the argument.

The changes have been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>