XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (153 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
10.94Mb size Format: txt, pdf, ePub

There may be cases where the existing nodes had a specific type annotation, but where revalidating the copied subtree either fails, or produces a different type annotation from the original. This is because the validation context may be different. If the subtree was originally validated as part of some larger tree, then it is possible that local element and attribute declarations were used on that occasion, whereas top-level element and attribute declarations are used this time. The top-level declarations may be either more or less permissive than the local declarations.

See Also


on page 287


on page 500

xsl:decimal-format

The

element is used to define the characters and symbols used when converting numbers into strings using the
format-number()
function.

Note that

applies only to the
format-number()
function. It has no effect on the way

formats numbers for display, nor on the default number-to-string conversion used by the
string()
function, nor on the format used when

is used to output a number as a string.

Changes in 2.0

The specification of the
format-number()
function, which uses the

declaration, is substantially rewritten in XSLT 2.0, though users should notice few changes except in a few corner cases. The

declaration itself is unchanged.

Import precedence now applies to decimal formats in a similar way as to other declarations.

Format

  name? = qname

  decimal-separator? = char

  grouping-separator? = char

  infinity? = string

  minus-sign? = char

  NaN? = string

  percent? = char

  per-mille? = char

  zero-digit? = char

  digit? = char

  pattern-separator? = char />

Position


is a top-level declaration. It may appear any number of times in a stylesheet, but only as an immediate child of the

element.

Attributes

Name
Value
Meaning
name
optional
Lexical QName
The name of this decimal format. If omitted, the attributes define the default decimal format.
decimal-separator
optional
Character
Character to be used to separate the integer and the fraction part of a number. Default is
.
(x2E).
grouping-separator
optional
Character
Character used to separate groups of digits. Default is
,
(x2C).
infinity
optional
String
String used to represent the numeric value infinity. Default value is
Infinity
.
minus-sign
optional
Character
Character used as the default minus sign. Default is
-
(x2D).
NaN
optional
String
String used to represent the numeric value NaN (not a number). Default value is
NaN
.
percent
optional
Character
Character used to represent a percentage sign. Default value is
%
(x25).
per-mille
optional
Character
Character used to represent a per-mille (per-thousand) sign. Default value is
(x2030).

Other books

Quincas Borba (Library of Latin America) by Joaquim Maria Machado de Assis
Let Me Know by Stina Lindenblatt
Christmas Treasure by Bonnie Bryant
The Mammy by Brendan O'Carroll
Made to Stick by Chip Heath
Blame by Nicole Trope
42 by Aaron Rosenberg
Electromagnetic Pulse by Bobby Akart