<?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>28550</bug_id>
          
          <creation_ts>2015-04-23 15:09:32 +0000</creation_ts>
          <short_desc>[FO31] format-number: &quot;positive&quot; and &quot;negative&quot;</short_desc>
          <delta_ts>2016-12-16 19:55:18 +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.1</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Michael Kay">mike</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>119809</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-04-23 15:09:32 +0000</bug_when>
    <thetext>The use of the terms &quot;positive&quot; and &quot;negative&quot; in the spec of format-number() is not as precise as it could be.

4.7.3 bullet 1 says &quot;If the picture-string contains two sub-pictures, the first is used for positive values and the second for negative values.&quot; (What about zero?)

4.7.4 para 2 says: &quot;If there are two sub-pictures, then these rules are applied to one sub-picture to obtain the values that apply to positive numbers, and to the other to obtain the values that apply to negative numbers. &quot;

4.7.5 rule 2 says: &quot;In the rules below, the positive sub-picture and its associated variables are used if the input number is positive, and the negative sub-picture and its associated variables are used otherwise. Negative zero is taken as negative, positive zero as positive.&quot; (This implies that for decimals, where zero is unsigned, the negative sub-picture is used to format decimal zero, which would lead to it having a minus sign prepended.)

I think the problem is essentially editorial, there&apos;s no room for doubt about the intent, but it definitely needs tidying up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119810</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-04-23 15:24:35 +0000</bug_when>
    <thetext>I propose the following changes:

4.7.3 bullet 1 says &quot;If the picture-string contains two sub-pictures, the first is used for positive *and unsigned zero* values, and the second for negative values.&quot;

4.7.4 para 2 says: &quot;If there are two sub-pictures, then these rules are applied to one sub-picture to obtain the values that apply to positive *and unsigned zero* numbers, and to the other to obtain the values that apply to negative numbers. &quot;

4.7.5 rule 2 says: &quot;In the rules below, the positive sub-picture and its associated variables are used if the input number is positive, and the negative sub-picture and its associated variables are used *if it is negative. For xs:double and xs:float, the negative sub-picture is used for negative zero, the positive sub-picture for positive zero. For xs:decimal and xs:integer, the positive sub-picture is used for zero.*&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120086</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-05-05 17:22:12 +0000</bug_when>
    <thetext>The change was accepted and has been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>