fn:format-number
format-number($value as numeric?, $picture as xs:string) ➔ xs:string
Formats a number as specified by a picture string, using the default decimal format.
Arguments | |||
| $value | numeric? | The number to be formatted |
| $picture | xs:string | Picture showing how the number is to be formatted |
Result | xs:string |
format-number($value as numeric?, $picture as xs:string, $decimal-format-name as xs:string?) ➔ xs:string
Formats a number as specified by a picture string, using the named decimal format.
Arguments | |||
| $value | numeric? | The number to be formatted |
| $picture | xs:string | Picture showing how the number is to be formatted |
| $decimal-format-name | xs:string? | Name of a decimal format definition defined in the context |
Result | xs:string |
Namespace
http://www.w3.org/2005/xpath-functions
Links to W3C specifications
XPath 3.0 Functions and Operators
Notes on the Saxon implementation
From Saxon 9.3 this becomes available for XPath/XQuery as well as XSLT. The query prolog declarations for defining a decimal format in XQuery become available in Saxon 9.4.