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
3.03Mb 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

Don't Stop Me Now by Jeremy Clarkson
Return To Forever by James Frishkey
Android Karenina by Winters, Ben H.
Cold Hit by Stephen J. Cannell
Haunted Moon by Yasmine Galenorn
Tides of Blood and Steel by Christian Warren Freed
Tristimania by Jay Griffiths
When Somebody Loves You by Cindy Gerard
Capital Risk by Lana Grayson