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

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

If an instruction is recognized by the XSLT processor, it is evaluated. The standard doesn't define exactly what “recognized by the XSLT processor” means. Typically, it means that either the instruction is a vendor-specific extension implemented by that vendor, or it is a user-defined extension that has been installed or configured according to the instructions given by the vendor. It is also quite permissible for one vendor, say Oracle, to recognize extensions defined by another vendor, say Microsoft.

If an instruction is
not
recognized by the XSLT processor, the action taken by an XSLT 2.0 processor is as follows:

  • For an element in the XSLT namespace, if the effective version is
    2.0
    or less, an error is reported. If the effective version is higher than
    2.0
    , fallback processing is invoked.
  • For an extension element, fallback processing is invoked.

Similarly, an XSLT 1.0 processor invokes fallback processing when it sees an instruction in the XSLT namespace if the effective version is
2.0
(or indeed, any value other than
1.0
).

The effective version is the value of the
[xsl:]version
attribute on the nearest enclosing element that has such an attribute (the attribute must be in the XSLT namespace if the element is
not
in the XSLT namespace, and vice versa). The value is a decimal number (for example
2.3
,
10.852
, or
17
), and it is compared numerically. The idea is that a stylesheet, or a portion of a stylesheet, that uses facilities defined in some future XSLT version, 2.1 (say), should be given an effective version of
2.1
.

Other books

Educating Esmé by Esmé Raji Codell
Caught in the Flames by Kacey Shea
The Grave Maurice by Martha Grimes
Only My Love by Jo Goodman
Hurricane by L. Ron Hubbard
Carolyn Keene - Nancy Drew by The Twin Dilemma
Taming the Last St Claire by Carole Mortimer