This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28590 - [FO31] and [FO30] comma or semicolon for the width specifier in formatting picture
Summary: [FO31] and [FO30] comma or semicolon for the width specifier in formatting pi...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-01 12:55 UTC by Abel Braaksma
Modified: 2015-05-06 01:19 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2015-05-01 12:55:33 UTC
For date/time functions that take a formatting picture string, the specification states:

   "The width modifier, if present, is introduced by a comma or semicolon. It takes the form:"

It then shows the form without a semicolon:

   ","  min-width ("-" max-width)?

And in the introduction of 9.8.4. (FO30 and FO31) it states:

   "2. The width modifier may be recognized by the presence of a comma."

Later in the text, it seems to only refer to a comma as an allowed width modifier introducer. I didn't readily find any tests that allow the semicolon in this position.

Looking back at the XSLT 2.0 specification, it only speaks of a comma.

It may be handy to allow a semicolon in this position (as the text suggests), in cases where you want the picture string to contain commas, you can use a single semicolon to introduce width, or vice versa, which seems more user-friendly than the rule that you must use a width modifier if you want to use a comma inside the token (i.e. as a thousands separator). 

Perhaps that was the original idea behind this, but the rest of the text does not reflect that.
Comment 1 Michael Kay 2015-05-05 14:56:28 UTC
I notice that the "comma or semicolon" phrase was not there in XSLT 2.0, but it was present in the first published draft of F+O 3.0 (then called "1.1" - 15 Dec 2009). That's also the first time that the paragraph appears saying what happens if there are two commas present. So I suspect that what happened is that we found there was a problem if you wanted to use a comma to separate seconds from fractional seconds; someone proposed allowing a semicolon as an alternative to comma for the width specifier; we resolved instead to make the last comma the one that counts; but the text suggesting the semicolon alternative remained in the spec.

I haven't been able to find the discussion that let this change.
Comment 2 Michael Kay 2015-05-05 16:59:16 UTC
The WG agreed that the "or semicolon" phrase was an aberration, and resolved to fix the bug by removing this option.

The change has been applied to the spec.
Comment 3 Abel Braaksma 2015-05-06 01:19:58 UTC
Thanks, that makes sense (comment#1). I believe I should now close the bug?

Marked as CLOSE / FIXED.