<?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>29736</bug_id>
          
          <creation_ts>2016-07-18 10:45:11 +0000</creation_ts>
          <short_desc>[FO31] C.2 Schema for the result of fn:json-to-xml</short_desc>
          <delta_ts>2016-12-16 19:55:28 +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>Windows NT</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="Tim Mills">tim</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>126966</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-07-18 10:45:11 +0000</bug_when>
    <thetext>Shouldn&apos;t key be use=&quot;required&quot; in the following?

    &lt;xs:attributeGroup name=&quot;key-group&quot;&gt;
        &lt;xs:attribute name=&quot;key&quot; type=&quot;xs:string&quot;/&gt;
        &lt;xs:attribute name=&quot;escaped-key&quot; type=&quot;xs:boolean&quot; use=&quot;optional&quot; default=&quot;false&quot;/&gt;
    &lt;/xs:attributeGroup&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126968</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-07-18 11:46:22 +0000</bug_when>
    <thetext>Also, we read

  &lt;xs:simpleType name=&quot;finiteNumberType&quot;&gt;
        &lt;xs:restriction base=&quot;xs:double&quot;&gt;
            &lt;!-- exclude positive and negative infinity, and NaN --&gt;
            &lt;xs:minExclusive value=&quot;-INF&quot;/&gt;
            &lt;xs:maxExclusive value=&quot;INF&quot;/&gt;
        &lt;/xs:restriction&gt;

But NaN is not excluded.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126970</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-07-18 12:05:50 +0000</bug_when>
    <thetext>Yes, I think it should (I always forget that attributes are optional by default, XSD is so inconsistent...)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126997</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-07-20 10:43:07 +0000</bug_when>
    <thetext>I have added use=&quot;required&quot; as suggested in comment #0 (the WG agreed this change).

I had overlooked comment #1, and this didn&apos;t come up in discussion. I believe the schema is correct here. Any minInclusive or maxInclusive constraint for xs:double has the effect of excluding NaN. For example, minExclusive says:

A value in an ·ordered· ·value space· is facet-valid with respect to ·minExclusive· if and only if the value is greater than {value}, according to the datatype&apos;s order relation.

NaN is not greater than negative infinity, therefore specifying a minExclusive of -INF also excludes NaN.

This is elaborated in XSD 1.1 part 2 section 3.3.4.1

Note: Any value ·incomparable· with the value used for the four bounding facets (·minInclusive·, ·maxInclusive·, ·minExclusive·, and ·maxExclusive·) will be excluded from the resulting restricted ·value space·.  In particular, when NaN is used as a facet value for a bounding facet, since no float values are ·comparable· with it, the result is a ·value space· that is empty.  If any other value is used for a bounding facet, NaN will be excluded from the resulting restricted ·value space·; to add NaN back in requires union with the NaN-only space (which may be derived using the pattern &apos;NaN&apos;). 

I&apos;m marking this RESOLVED, but please re-open if you think this is still a problem.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>