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
10.27Mb size Format: txt, pdf, ePub
ads

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
    .
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
10.27Mb size Format: txt, pdf, ePub
ads

Other books

The Demon's Brood by Desmond Seward
Seek My Face by John Updike
The Good Soldier by L. T. Ryan
Twilight's Eternal Embrace by Nutt, Karen Michelle
Triumph by Heather Graham