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

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

or
ordinal=“-er”
in
German
. For other languages with more complicated rules, it's left to the implementor to sort out what to do. For formatting tokens that aren't included in the table above, the XSLT specification is not prescriptive. It indicates that any formatting token may be used to indicate a sequence starting with this token, provided the implementation supports such a sequence; if the implementation does not support such a sequence, it may format the number using the formatting token
1
. So, for example, if an implementation supports the
numbering sequence
α, β, γ, δ
, you can invoke this sequence with a formatting token of
α
.

In case the formatting token does not identify a numbering sequence unambiguously, two attributes are provided to give greater control:

  • The
    lang
    attribute is intended to indicate the target language: for example, the sequence starting with a Cyrillic capital letter
    A
    (x0410 in Unicode) might be different for Russian
    (
    lang=“ru”
    )
    and for Bulgarian
    (
    lang=“bg”
    )
    . The language code is intended to take the same form as the
    xml:lang
    attribute defined in the XML specification.
  • The most obvious case where this changes the output is for the formatting tokens such as
    w
    . For example, if
    lang=“de”
    , the output for
    w
    would become
    eins
    ,
    zwei
    ,
    drei
    .

Other books

The House of the Seven Gables by Nathaniel Hawthorne
Komarr by Lois McMaster Bujold
Contagious by Emily Goodwin
Midnight on the Moon by Mary Pope Osborne
Eternity's Wheel by Neil Gaiman