14.1 Extension Elements
Extension Elements
The
element extension mechanism allows namespaces to be designated as
extension namespaces. When a namespace is designated as
an extension namespace and an element with a name from that namespace
occurs in a template, then the element is treated as an instruction
rather than as a literal result element. The namespace
determines the semantics of the instruction.
NOTE:
Since an element that is a child of an
xsl:stylesheet element is not occurring in a
template, non-XSLT Top-level elements are not extension
elements as defined here, and nothing in this section applies to
them.
A namespace is designated as an extension namespace by using an
extension-element-prefixes attribute on an
xsl:stylesheet element or an
xsl:extension-element-prefixes attribute on a literal
result element or extension element.
The value of both these attributes is a
whitespace-separated list of namespace prefixes. The namespace bound
to each of the prefixes is designated as an extension namespace. It
is an error if there is no namespace bound to the prefix on the
element bearing the extension-element-prefixes or
xsl:extension-element-prefixes attribute. The default
namespace (as declared by xmlns) may be designated as an
extension namespace by including #default in the list of
namespace prefixes. The designation of a namespace as an extension
namespace is effective within the subtree of the stylesheet rooted at
the element bearing the extension-element-prefixes or
xsl:extension-element-prefixes attribute;
a subtree rooted at an xsl:stylesheet element
does not include any stylesheets imported or included by children
of that xsl:stylesheet element.
If the XSLT processor does not have an implementation of a
particular extension element available, then the
element-available function must return false for
the name of the element. When such an extension element is
instantiated, then the XSLT processor must perform fallback for the
element as specified in [Fallback]. An XSLT processor
must not signal an error merely because a template contains an
extension element for which no implementation is available.
If the XSLT processor has an implementation of a particular
extension element available, then the
element-available function must return true for
the name of the element.
|