XSLT 2.0 implementation
The xsl:principal-result-document
element is withdrawn.
Note, however, that the ability to NOT have a principal result tree is not yet available.
A principal output file will be created even if it is empty.
Attributes of xsl:output
can no longer be attribute value templates.
A new attribute has been added to xsl:output
: saxon:byte-order-mark="yes"
causes a byte order mark (hex FEFF) to be inserted at the start of the output file. This is most
useful with UTF-8 and UTF-16 encoding, as some text editors recognize it, but it is available for
use with any output method and any encoding. {outp70}
The saxon:omit-meta-tag
attribute in xsl:output
has been replaced with the
new (standard) include-content-type
attribute. Note that this works the other way around:
replace saxon:omit-meta-tag="yes"
by include-content-type="no"
.
{saxon47, outp71}
The new (standard) escape-uri-attributes
attribute in xsl:output
has
been implemented for the HTML output method. (URI escaping is not yet implemented for method="xhtml").
{outp71}
The built-in template rules now pass parameters through unchanged to the templates for their child
elements. This applies whether the rule is called because of xsl:apply-templates
or xsl:apply-imports
{cnfr21, cnfr22}.
The base URI of the root of a temporary tree is now taken from the base URI of the xsl:variable
element in the stylesheet. Previously it was taken from the system ID. There is a difference in the case
where xml:base is used. {not tested}
A variable that is never referenced will no longer be evaluated. This can cause problems if evaluation
of the variable has side-effects (e.g. by calling an extension function, or saxon:assign
). You
can force evaluation of the variable by setting saxon:assignable="yes"
.
The terminate
attribute of xsl:message
may now be an attribute value
template. {ver14}
The copy-namespaces
attribute of xsl:copy
and xsl:copy-of
is
now supported. {copy12-13}
The type
attribute of xsl:variable
, xsl:param
,
and xsl:result
is renamed as
.
The as
and collation
attributes of xsl:key
are now supported.
This allows indexing of nodes by numeric or date values, and matching using case-blind or accent-blind comparisons.
{idky25-29}.
The type-annotation
attribute of xsl:attribute
and xsl:element
and the xsl:type-annotation
of literal result elements are supported. For example, you
can now annotate attributes of elements on a temporary tree as type-annotation="xs:ID"
, and
then use the id()
function to find them, using an expression such as $tree/id('A001')
.
The actual value of the element or attribute must be valid according the the type given in the type annotation. Only built-in
schema-defined types are currently supported. Attribute types derived from a DTD will be recorded if they
are reported by the parser (but CDATA is treated as untyped, and the list types IDREFS, ENTITIES, and NMTOKENS
are not yet supported). Although the values must be valid according to their type, there are no checks on
uniqueness constraints (ID) or referential integrity constraints (IDREF). {schema001-4}
The type annotations are retained on the tree only if the attribute type-information="preserve"
is present. If the attribute is absent, or is set to none
, the type-annotation on any
elements or attributes in the tree will still be used to validate the content, but will not result
in any annotation of the nodes on the tree. The values strict
and lax
for this attribute are not yet implemented. {schema005-6}
The type-information
attribute is also available on xsl:result-document
.
It only affects the outcome if the result tree is captured using a user-written Receiver
in which
the annotations will be available. At present the type annotations are NOT retained if
the result is fed into another stylesheet using
saxon:next-in-chain
: this is because the chaining goes via a SAX2 ContentHandler
which cannot pass the type information through. {schema007, schema013}
The attribute copy-type-annotations
is available on xsl:copy-of
. The default
is "no", which means that type annotations are NOT copied from the source tree to the result tree.
{schema011-012}
The effect of xsl:namespace-alias
has been changed. Elements and attributes whose namespace
is changed by an xsl:namespace-alias
declaration will now take the prefix given in
the result-prefix
attribute, where possible. Previously they took the new namespace URI
but retained their original prefix. This was technically conformant with the specification, but untidy,
and it often led to the result document containing multiple declarations
of the same namespace URI. {nspc36-38}
Conflicting xsl:namespace-alias
declarations are now reported as a static error.
{error007}