<?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>28514</bug_id>
          
          <creation_ts>2015-04-20 04:11:27 +0000</creation_ts>
          <short_desc>[QT3] format-integer-044 does not take minus-sign into account</short_desc>
          <delta_ts>2015-04-20 14:05:01 +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>119668</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-20 04:11:27 +0000</bug_when>
    <thetext>This test tests format-integer(-5, &apos;Ww;o&apos;) to be equal to &quot;-Fifth&quot;, but in words, this is &quot;Minus Fifth&quot;.

I think this ought to be changed to accommodate for this variant:

&lt;any-of&gt;
    &lt;assert-eq&gt;&apos;-Fifth&apos;&lt;/assert-eq&gt;
    &lt;assert-eq&gt;&apos;Minus Fifth&apos;&lt;/assert-eq&gt;
&lt;/any-of&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119672</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-04-20 07:57:46 +0000</bug_when>
    <thetext>This would require a spec change, and the spec change would create a backwards incompatibility.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119687</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-20 13:42:51 +0000</bug_when>
    <thetext>Oh, my bad, I didn&apos;t find it in the spec under &quot;w&quot;, &quot;W&quot; and &quot;Ww&quot;, but now I see that there&apos;s a line saying:

    If the value of $value is negative, the rules below are applied to the 
    absolute value of $value, and a minus sign is prepended to the result.

It looks so odd. Anyway, it was not my intention to suggest a spec change, I thought the test was wrong. Apparently not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119690</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-04-20 14:01:15 +0000</bug_when>
    <thetext>I think code that wants to handle negative numbers with format-integer will often apply format-integer to the absolute value, and then &quot;do its own thing&quot; to indicate that it is negative. For example

&quot;The temperature is &quot; || format-integer(abs($N)) || &quot; degrees &quot; || (if ($N gt 0) then &quot;above zero&quot; else if ($N lt 0) then &quot;below zero&quot; else &quot;&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119692</commentid>
    <comment_count>4</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-20 14:05:01 +0000</bug_when>
    <thetext>Yes, that makes sense. Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>