<?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>28515</bug_id>
          
          <creation_ts>2015-04-20 05:33:33 +0000</creation_ts>
          <short_desc>[QT3] format-integer-040, expects error, but is valid format string</short_desc>
          <delta_ts>2015-04-20 14:04:17 +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>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>mike</cc>
          
          <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>119669</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-20 05:33:33 +0000</bug_when>
    <thetext>This test tests &quot;format-integer(1234, &apos;123&amp;#x661;&apos;)&quot;, and expects &quot;FODF1310&quot; to be thrown, but the spec says, under 4.6.1:

   A mandatory-digit-sign is a ·character· in Unicode category Nd. All 
   mandatory-digit-signs within the format token must be from the same digit 
   family, where a digit family is a sequence of ten consecutive characters in 
   Unicode category Nd, having digit values 0 through 9. Within the format token, 
   these digits are interchangeable: a three-digit number may thus be indicated 
   equivalently by 000, 001, or 999.

and later:

    If the primary format token contains at least one Unicode digit then it is 
    taken as a decimal digit pattern, and in this case it must match the regular 
    expression ^((\p{Nd}|#|[^\p{N}\p{L}])+?)$.

The digit &quot;&amp;#x661;&quot;, or &quot;١&quot; or &quot;ARABIC-INDIC DIGIT ONE&quot; is part of \p{Nd} and therefore fits the above regular expression. 

According to the earlier interchangeable rule, I think the correct outcome is &quot;1234&quot; for this test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119673</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-04-20 08:03:46 +0000</bug_when>
    <thetext>It seems to me that this format string clearly violates the rule

All mandatory-digit-signs within the format token must be from the same digit family

and violating one rule is enough to make it an error.

Perhaps you are misreading &quot;these digits are interchangeable&quot;: it is intended to mean that the digits within a digit family are interchangeable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119688</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-20 13:47:47 +0000</bug_when>
    <thetext>&gt; All mandatory-digit-signs within the format token must be from the same 
&gt; digit family

I think I didn&apos;t know / get / understand what &quot;digit family&quot; means. The way I understood it, it is either Nd, Nl or No. 

Reading it again, I see that it is written clearly and I even quoted it in comment#0: &quot;[...]where a digit family is a sequence of ten consecutive characters[...]&quot;.

And yes, the characters in this test are clearly not consecutive within a range of 10 digits.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119691</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-20 14:04:17 +0000</bug_when>
    <thetext>Resolving the bug as invalid.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>