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

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
10.87Mb size Format: txt, pdf, ePub
  • The prefix always appears at the start of the output string.
  • The
    n
    th formatting token is used to format the
    n
    th number in the list where possible, using the rules in the following section.
  • If there are more numbers in the list than formatting tokens, then the excess numbers are formatted using the last formatting token. For example, if the list is
    3,1,2,5
    and the format attribute is
    A.1
    , then the output will be
    C.1.2.5
    .
  • If there are no formatting tokens, then a formatting token of
    1
    is used.
  • If there are more formatting tokens than numbers in the list, the excess formatting tokens are ignored.
  • The first number, after formatting, is added to the output string immediately after the prefix.
  • Each subsequent number is preceded in the output by the separator that precedes the formatting token used to format this number, if there is one, or by
    .
    if there is no preceding separator.
  • The suffix is added to the end of the output string.

Note that if the place marker is an empty sequence, the result will consist of the prefix and suffix only. For example, if the format string is
[1]
, an empty sequence will be formatted as
[]
. The most likely reason for an empty sequence is that no nodes matched the
count
pattern.

Other books

All About B.A.D. by Melba Heselmeyer
Where There's a Will by Bailey Bradford
Ruptured: The Cantati Chronicles by Gallagher, Maggie Mae
Seven Stories Up by Laurel Snyder
Seeker by Arwen Elys Dayton
Bergdorf Blondes by Plum Sykes