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 14826 - [F030] format-integer language argument
Summary: [F030] format-integer language argument
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.0 (show other bugs)
Version: Member-only Editors Drafts
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: 2011-11-14 16:52 UTC by Tim Mills
Modified: 2011-11-25 14:40 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2011-11-14 16:52:16 UTC
The following formatting functions all accept the empty sequence for the $language argument.

    fn:format-dateTime($value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string?

    fn:format-date($value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string?

    fn:format-time($value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string?

and have consistent handling of the $language argument.

However fn:format-integer does not permit the empty sequence and has inconsistent handling of invalid values.

    fn:format-integer($value as xs:integer?, $picture as xs:string, $language as xs:string) as xs:string

Could this not be made consistent with the other formatting functions, so that

1. a call to the two-argument function is equivalent to a call to the three-argument version with the third argument set to the empty sequence.

2. If the $language argument is omitted or is set to an empty sequence, or if it is set to an invalid value or a value that the implementation does not recognize, then the processor uses an 
Comment 1 Michael Kay 2011-11-16 17:44:41 UTC
Discussed by the WG on 15 Nov 2011, agreed that the specs should be aligned and that when format-integer is given any of: (an empty sequence; nothing; an invalid value; a value not supported by the implementation), it should in each case fall back to a default language.
Comment 2 Tim Mills 2011-11-25 14:40:06 UTC
Thanks.