xslt:format-number

xslt:format-number(numeric $value, string $picture) → string

Function signature

$value

xs:double ?

$picture

xs:string

Result

xs:string

Formats a number as specified by a picture string, using the default decimal format

XSLT 2.0 Specification

Implemented. Changed in 8.2 to allow the empty sequence as the first argument; this behaves as if NaN were supplied. Changed in 8.2 to handle decimals natively, without first converting them to doubles; this means that the full precision can be retained. The old implementation based on Java decimal formatting, which had been retained under the name format-number-1.0(), is dropped from 8.5

xslt:format-number(numeric $value, string $picture, string $decimal-format) → string

Function signature

$value

xs:double ?

$picture

xs:string

$decimal-format

xs:string

Result

xs:string

Formats a number as specified by a picture string, using a named decimal format

XSLT 2.0 Specification

Implemented. See two-argument version of format-number().

Expand

Up  Next