W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2011

[Bug 10859] [XQuery30] Editorial: Decimal Format Declaration missing an example

From: <bugzilla@jessica.w3.org>
Date: Sat, 10 Sep 2011 19:23:02 +0000
To: public-qt-comments@w3.org
Message-Id: <E1R2T8o-0005Kg-Fn@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10859

Jonathan Robie <jonathan.robie@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Jonathan Robie <jonathan.robie@gmail.com> 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

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Saturday, 10 September 2011 19:23:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:15 GMT