<?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>15232</bug_id>
          
          <creation_ts>2011-12-16 15:25:04 +0000</creation_ts>
          <short_desc>[QT3TS] format-integer-055</short_desc>
          <delta_ts>2012-05-18 15:37:43 +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>Member-only Editors Drafts</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>
          <cc>jim.melton</cc>
    
    <cc>mike</cc>
    
    <cc>oneil</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>61663</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2011-12-16 15:25:04 +0000</bug_when>
    <thetext>The expected result of the test

format-integer(1,&apos;bo&apos;)

is

&apos;b&apos;

Why does the &apos;o&apos; format modifier have no effect?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61665</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-12-16 15:45:58 +0000</bug_when>
    <thetext>I guess because of:

If ordinal numbering is not supported for the combination of the format token, the language, and the string appearing in parentheses, the request is ignored and cardinal numbers are generated instead.

Like many aspects of the format-X functions, implementations have a lot of latitude. We can either make the test results strictly reflect this, or we can make best guesses as to consensus interpretations of the spec. For example, we could allow b or b&apos;th.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61670</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2011-12-16 16:21:51 +0000</bug_when>
    <thetext>We generated the result

bst

(i.e. 1st, where 1 == b)

I&apos;m happy to change our implementation, but I&apos;d like some rules to guide me on what changes to make for compatibility with other implementations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61675</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-12-16 16:42:24 +0000</bug_when>
    <thetext>The aim is to be user-friendly, and to me bst doesn&apos;t seem to achieve that. I can conceive of someone wanting the sequence

Ith Jth Kth Lth Mth Nth

but it&apos;s a bit far-fetched, and you would probably want the &apos;th&apos; to be a subscript in which case you would add it outside the scope of format-integer.

So as far as the test is concerned, I think the principle should be that if there&apos;s evidence of a &quot;real-world&quot; usage of an ordinal equivalent of the sequence a, b, c, then we should make it an acceptable result, but to my mind &quot;bst&quot; doesn&apos;t satisfy that criterion.

Probably &quot;b&quot; as a starting point for a sequence is a bit outlandish anyway. I added support in Saxon for any alphabetic start point so you could do (i, j ,k) or (x, y, z) or (p, q, r), all of which are encountered as sequences in real life. But there&apos;s nothing in the spec to create an expectation that these sequences will be supported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67860</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-05-18 11:09:29 +0000</bug_when>
    <thetext>This test was written to check the parsing of format pictures. It seems clear that the picture is valid, but the result is implementation-defined. I&apos;m therefore going to change the assertion to

&lt;assert-type&gt;xs:string&lt;/assert-type&gt;

to make it clear that any result other than an error is acceptable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67893</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-05-18 15:37:43 +0000</bug_when>
    <thetext>Confirmed fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>