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 10859 - [XQuery30] Editorial: Decimal Format Declaration missing an example
Summary: [XQuery30] Editorial: Decimal Format Declaration missing an example
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.0 (show other bugs)
Version: Member-only Editors Drafts
Hardware: PC Windows NT
: P2 minor
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 14:48 UTC by Oliver Hallam
Modified: 2011-09-10 19:23 UTC (History)
1 user (show)

See Also:


Attachments

Description Oliver Hallam 2010-09-30 14:48:24 UTC
Section 4.10 (Decimal Format Declaration) is missing a usage example.
Comment 1 Jonathan Robie 2011-09-10 19:23:02 UTC
Added this example:

declare decimal-format local:de decimal-separator = "," grouping-separator = ".";
declare decimal-format local:en decimal-separator = "." grouping-separator = ",";

let $numbers := (1234.567, 789, 1234567.765)
for $i in $numbers
return (
  format-number($i, "#.###,##", "local:de"),
  format-number($i, "#,###.##", "local:en")
)

Output:

1.234,57 1,234.57 789 789 1.234.567,76 1,234,567.76