<?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>12280</bug_id>
          
          <creation_ts>2011-03-10 10:48:26 +0000</creation_ts>
          <short_desc>[FO 3.0], Section 4.5.1: Lack of clarity in the definition of a format-token</short_desc>
          <delta_ts>2012-01-19 09:12:03 +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>PC</rep_platform>
          <op_sys>Linux</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="O&apos;Neil Delpratt">oneil</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>46602</commentid>
    <comment_count>0</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2011-03-10 10:48:26 +0000</bug_when>
    <thetext>In the description of the format-token criteria, it does not clearly state what is a format-token. This would help in the understanding of the bullet point &quot;Any other format token indicates a numbering sequence...&quot;.

To help in the clarification please see an email I received from Christian Grun:

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

This query is accepted, as the character &apos;b&apos; is interpreted as format
token that &quot;indicates a numbering sequence in which that token
represents the number 1 (one)&quot; [1]. The trailing &quot;o&quot; seems to be
ignored; I would rather have expected it to be interpreted as optional
&quot;format modifier&quot;.

2) format-integer(1, &apos;oo&apos;)

This query is rejected with the message &quot;The format modifier is not
valid&quot;. My assumption that the first &quot;o&quot; is interpreted as an optional
&quot;format modifier&quot;?

3) format-integer(1, &apos;boo&apos;)

The (expected) error of this query might underline the assumption for Query 2.

4) format-integer(1, &apos;bb&apos;)

This query is accepted, and the trailing &apos;b&apos; is ignored (which is
probably ok, as I&apos;m not sure if this case is reflected by the spec).


To arrive at a consistent behavior, it might suffice to decide how
trailing, unparsed characters are to be treated, and to always
interpret the first character(s) as &quot;primary format token&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46607</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-03-10 14:04:03 +0000</bug_when>
    <thetext>To add an observation:

(a) The rules for how to handle format-tokens were taken from the XSLT 2.0 spec, where a format-token is described as &quot;a maximal sequence of alphanumeric characters&quot;. The definition itself wasn&apos;t transferred to F+O.

(b) We can&apos;t use exactly the same definition in F+O because the format modifier follows directly after the format token. This was to align with format-date and friends - which has the same problem, and we can&apos;t easily change the syntax for compatibility reasons.

It&apos;s not particularly elegant, but I propose that the format-token is defined by changing this sentence:

* A picture consists of a primary format token, followed by an optional format modifier.

to read

* A picture consists of a primary format token, followed by an optional format modifier. If the picture is two or more characters in length and the final character is one of those permitted as a format modifier, then the primary format token consists of the entire picture except for its final character; otherwise the primary format token is the entire picture.

Should also add a similar clarification to format-date.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46722</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-03-15 15:54:55 +0000</bug_when>
    <thetext>The WG accepted the proposal in comment #2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62891</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-01-19 09:12:03 +0000</bug_when>
    <thetext>For a continuation of this issue, see bug #14858</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>