<?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>20876</bug_id>
          
          <creation_ts>2013-02-05 14:52:50 +0000</creation_ts>
          <short_desc>[XQX30] decimalFormatDecl</short_desc>
          <delta_ts>2013-11-19 00:17:06 +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>XQueryX 3.0</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="Jim Melton">jim.melton</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>82577</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2013-02-05 14:52:50 +0000</bug_when>
    <thetext>It&apos;s possible to define a decimalFormatDecl which is both the default (@default = &apos;true&apos;) and has a name.  This isn&apos;t possible in XQuery.  

I&apos;d argue that the &quot;default&quot; attribute here is redundant.  Absence of the decimalFormatName is enough to indicate that it is the declaration for the default decimal format.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84539</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2013-03-17 22:58:00 +0000</bug_when>
    <thetext>It is true that the XQueryX schema permits both a &quot;name&quot; child element and a &quot;default&quot; attribute with a value of &apos;true&apos; to both be specified in the same decimalFormatDecl element.  However, any attempt to transform such a decimalFormatDecl element to XQuery syntax will generate an error:

  &lt;xsl:template match=&quot;xqx:decimalFormatDecl&quot;&gt;
    &lt;xsl:if test=&quot;@xqx:default = &apos;true&apos; and xqx:decimalFormatName&quot;&gt;
      &lt;xsl:message terminate=&quot;yes&quot;&gt;Incorrect XQueryX: xqx:decimalFormatDecl does not allow both @default=true and xqx:decimalFormatName&lt;/xsl:message&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:text&gt;declare &lt;/xsl:text&gt;
    &lt;xsl:if test=&quot;@xqx:default = &apos;true&apos;&quot;&gt;
      &lt;xsl:text&gt;default &lt;/xsl:text&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:text&gt;decimal-format &lt;/xsl:text&gt;
    &lt;xsl:if test=&quot;xqx:decimalFormatName&quot;&gt;
      &lt;xsl:apply-templates select=&quot;xqx:decimalFormatName&quot;/&gt;
      &lt;xsl:text&gt; &lt;/xsl:text&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:apply-templates select=&quot;xqx:decimalFormatParam&quot;/&gt;
  &lt;/xsl:template&gt;

Nonetheless, your point is taken and I have modified the XQueryX schema accordingly:

  &lt;xsd:complexType name=&quot;decimalFormatDeclType&quot;&gt;
        &lt;xsd:sequence&gt;
          &lt;xsd:element name=&quot;decimalFormatName&quot; type=&quot;EQName&quot; minOccurs=&quot;0&quot;/&gt;
          &lt;xsd:element name=&quot;decimalFormatParam&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
            &lt;xsd:complexType&gt;
              &lt;xsd:sequence&gt;
                &lt;xsd:element name=&quot;decimalFormatParamName&quot;&gt;
                  &lt;xsd:simpleType&gt;
                    &lt;xsd:restriction base=&quot;xsd:NMTOKEN&quot;&gt;
                      &lt;xsd:enumeration value=&quot;decimal-separator&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;grouping-separator&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;infinity&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;minus-sign&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;NaN&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;percent&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;per-mille&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;zero-digit&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;digit&quot;/&gt;
                      &lt;xsd:enumeration value=&quot;pattern-separator&quot;/&gt;
                    &lt;/xsd:restriction&gt;
                  &lt;/xsd:simpleType&gt;
                &lt;/xsd:element&gt;
                &lt;xsd:element name=&quot;decimalFormatParamValue&quot; type=&quot;xsd:string&quot;/&gt;
              &lt;/xsd:sequence&gt;
            &lt;/xsd:complexType&gt;
          &lt;/xsd:element&gt;
        &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;

I&apos;ve marked this bug RESOLVED/FIXED.  If you agree, please mark it CLOSED.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87344</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2013-05-07 16:16:25 +0000</bug_when>
    <thetext>Thanks.  I&apos;m happy that this resolves the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96484</commentid>
    <comment_count>3</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2013-11-19 00:17:06 +0000</bug_when>
    <thetext>The author of the original bug report agrees that it has been resolved to his satisfaction.  The fact that it was not marked CLOSED at the time was accidental, so I am marking it CLOSED now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>