<?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>10387</bug_id>
          
          <creation_ts>2010-08-17 17:39:30 +0000</creation_ts>
          <short_desc>[FO11]: format-integer format token to disallow digits besides 0 or 1</short_desc>
          <delta_ts>2010-08-31 21:59:10 +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.0</component>
          <version>Working drafts</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</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="Brett Zamir">brettz9</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>37561</commentid>
    <comment_count>0</comment_count>
    <who name="Brett Zamir">brettz9</who>
    <bug_when>2010-08-17 17:39:30 +0000</bug_when>
    <thetext>Hi,

In the docs under section 4.5.1, it says, &quot;The primary format token is one of the following:...Any sequence of Unicode digits drawn from the same digit family, where a digit family is a sequence of ten consecutive Unicode characters in category Nd, having digit values 0 through 9.&quot;

While the example makes clear how the different language equivalents might interpret 0 and 1, it is not clear to me from the text how other digits are to be interpreted, though I might guess they would be treated like 1 (though in that case I see no reason to allow other numbers, as it could be confusing if they all behave like 1). Thank you...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37562</commentid>
    <comment_count>1</comment_count>
    <who name="Brett Zamir">brettz9</who>
    <bug_when>2010-08-17 18:07:05 +0000</bug_when>
    <thetext>I am aware of the statement which follows, &quot;Any other format token indicates a numbering sequence in which that token represents the number 1 (one)&quot; (a statement which I think is itself a bit confusing in referring to &quot;number 1&quot; instead of &quot;format token 1&quot;, though that is cleared up in the next sentence), but since the first clause explicitly deals with &quot;[a]ny sequence of Unicode digits drawn from the same digit family&quot;, I think that first clause should either limit itself to equivalent digits for 0 and 1 (so the &quot;Any other format token...&quot; statement can take effect), or else explicitly indicate how the tokens 2-9 are to be handled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37563</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-08-17 18:41:17 +0000</bug_when>
    <thetext>Thanks for the comment. format-integer combines elements of format-number and xsl:number; format-number uses &quot;000&quot; for a three-digit output field, while xsl:number uses &quot;001&quot;. We wanted to eliminate this difference. xsl:number also allows formats such as &quot;999&quot; (remember COBOL?) but their meaning is essentially implementor-defined. So we thought it made sense to allow a three digit output to be indicated by any sequence of digits, that is, in the format picture all digits are interchangeable. I&apos;ll see if this can be explained more clearly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37591</commentid>
    <comment_count>3</comment_count>
    <who name="Brett Zamir">brettz9</who>
    <bug_when>2010-08-18 04:32:50 +0000</bug_when>
    <thetext>Ok, thanks. If the picture needs to be confined to 3 digits at most, I think that also should be specified. If not, though, it could be useful as an indefinitely sized fixed width filler: e.g., 0000123.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37592</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-08-18 07:54:25 +0000</bug_when>
    <thetext>I was only using three digits as an example. You can use &quot;000&quot; if you want at least three digits, &quot;000000&quot; if you want at least 6, and so on.

I&apos;ll have another read of the text to see if it can be clarified. It was extracted almost verbatim from the specification of xsl:number in the XSLT specification - perhaps moving the text has lost some of the context and more introductory explanation is needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37672</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-08-20 18:39:45 +0000</bug_when>
    <thetext>The text for this function has in fact been significantly improved since the Dec 2009 working draft.  

The paragraph cited in comment #0 now reads: &quot;a mandatory-digit-sign is a Unicode character in 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 Unicode characters in 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.&quot; - which seems to address the point you are making.

I&apos;m not sure I understand the problem you are describing in comment #2. This text has been part of the xsl:number specification for many years. By saying &quot;Any other format token&quot;, it means an alphanumeric not listed above, for example greek letter alpha, and indicates that if the implementation supports it, this format token may be used to denote a numbering sequence such as &amp;#945;, &amp;#946;, &amp;#947;, ... The first rule (or two rules, in the Dec 2009 version) covers format tokens containing Unicode digits; the subsequent rules therefore are only concerned with tokens made up of non-digits.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38356</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-08-31 21:59:10 +0000</bug_when>
    <thetext>The WG decided to close this as resolved/fixed on the basis that we have made changes to the specification that address some of your concerns, and have responded to the other concerns to explain why the spec is as it is. We would be grateful if you take a look at the revised text when it is next published, and please feel free to reopen the bug if you feel there are outstanding concerns.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>