XML technologies / XSLT / Reference: XSLT 1.0 & 2.0 elements / transform
(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 6.)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Classification | Root element |
Functional group | Root element of an XSLT stylesheet |
Introduction | XSLT 1.0 |
Position in the stylesheet and permitted content:
The element xsl:transform is an alternative to the more commonly used xsl:stylesheet for defining the body of an XSLT stylesheet. It also defines global default attribute values and namespaces that apply throughout the stylesheet. The version attribute also identifies the XSLT version to which the stylesheet conforms.
The xsl:transform element, together with xsl:stylesheet, belongs to the group of root elements and therefore serves as the root element of an XSLT stylesheet. Consequently, it has no parent element.
Note: The XSLT element xsl:transform is a synonym for xsl:stylesheet and behaves identically. A detailed explanation of the content and attributes, together with examples using both elements, can therefore be found in the description of xsl:stylesheet.
Element definition:
XSLT 1.0:
<!-- Category: root-element -->
<xsl:transform
id = id
extension-element-prefixes = tokens
exclude-result-prefixes = tokens
version = number>
<!-- Content: (xsl:import*, top-level-elements) -->
</xsl:transform>
XSLT 2.0:
<!-- Category: root-element -->
<xsl:transform
id? = id
extension-element-prefixes? = tokens
exclude-result-prefixes? = tokens
version = number
xpath-default-namespace? = uri
default-validation? = "preserve" | "strip"
default-collation? = uri-list
input-type-annotations?= "preserve" | "strip" | "unspecified">
<!-- Content: (xsl:import*, other-declarations) -->
</xsl:transform>
Copyright © Galileo Press, Bonn 2008
You may print the online version for your private use.
Otherwise, this chapter from "XSLT 2.0 & XPath 2.0 ― Das umfassende Handbuch" is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Galileo Press, Rheinwerkallee 4, 53227 Bonn