XML technologies / XSLT / Reference: XSLT 1.0 and 2.0 elements / Alphabetical reference of XSLT elements

(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

 

This alphabetical reference classifies each element by function group and states its introductory version. XSLT 2.0 elements cannot be used in XSLT 1.0. It outlines the element’s purpose, stylesheet position, allowed content and attributes. Required, optional and newly added XSLT 2.0 attributes are marked. Attributes permitting an attribute value template are marked AVT (Attribute Value Template).

Usage, differences between XSLT 1.0 and 2.0, and examples follow. Each entry ends with the XSLT 2.0 element definition and, where needed, the XSLT 1.0 definition.

A

xsl:analyze-string

examines the input string selected by attribute select using a regular expression.

xsl:apply-imports

calls the template whose match attribute matches a child of the current context node.

xsl:apply-templates

calls the template whose match attribute matches a child of the current context node.

xsl:attribute

creates an attribute in the enclosing result-tree element.

xsl:attribute-set

groups attributes into an attribute set.

 

 

 

Back to top

 

C

xsl:call-template

invokes an explicitly named template.

xsl:character-map

declares a character map.

xsl:choose

contains one or more xsl:when instructions and optionally a final xsl:otherwise instruction.

xsl:comment

creates a comment node in the result document.

xsl:copy

copies the current context node into the result.

xsl:copy-of

copies a node with all descendants, attributes and namespace nodes into the result.

 

 

 

Back to top

 

D

xsl:decimal-format

defines the characters used in decimal-number formatting patterns.

xsl:document

creates a temporary document node, added to the result or stored in a variable.

 

 

 

Back to top

 

E

xsl:element

creates an element node in the result.

 

 

 

Back to top

 

F

xsl:fallback

handles the error caused by an instruction unsupported by the XSLT processor.

xsl:for-each

implements a conventional FOR loop.

xsl:for-each-group

groups the input sequence specified by select according to a criterion.

xsl:function

creates user-defined functions.

 

 

 

Back to top

 

I

xsl:if

implements an IF test without an alternative ELSE branch.

xsl:import

imports all templates and declarations from an external stylesheet.

xsl:import-schema

imports XML Schema definitions.

xsl:include

imports all templates and declarations from an external stylesheet.

 

 

 

Back to top

 

K

xsl:key

declares a key.

 

 

 

Back to top

 

M

xsl:matching-substring

is always a child of xsl:analyze-string.

xsl:message

emits the output values of its subinstructions as a transformation message.

 

 

 

Back to top

 

N

xsl:namespace

creates a namespace node in the result.

xsl:namespace-alias

is a declaration directly under root element xsl:stylesheet.

xsl:next-match

calls another template.

xsl:non-matching-substring

is always a child of xsl:analyze-string.

xsl:number

generates numbering such as ordered list items (1., 2., 3., etc.), chapters and subchapters (1., 1.1, 1.2, 1.3, 1.3.1, 1.3.2, etc.), and other schemes.

 

 

 

Back to top

 

O

xsl:otherwise

is always a child of xsl:choose and has at least one preceding sibling xsl:when.

xsl:output

specifies the result document’s output form.

xsl:output-character

is a subinstruction of the xsl:character-map declaration.

 

 

 

Back to top

 

P

xsl:param

defines a named parameter assigned values, strings or entire code blocks.

xsl:perform-sort

groups and prioritises sorting specifications declared with xsl:sort.

xsl:preserve-space

explicitly declares at the top level which elements preserve whitespace nodes in the result.

xsl:processing-instruction

creates a processing instruction at its position in the result.

 

 

 

Back to top

 

R

xsl:result-document

creates another result document during transformation.

 

 

 

Back to top

 

S

xsl:sequence

explicitly outputs a sequence.

xsl:sort

sorts a node sequence by the criterion selected through select.

xsl:strip-space

explicitly declares at the top level which elements discard whitespace nodes from the result.

xsl:stylesheet

is the root element of an XSL document.

 

 

 

Back to top

 

T

xsl:template

contains instructions whose output goes directly into the result document.

xsl:text

marks text nodes and copies them unchanged into the result.

xsl:transform

is the root element of an XSL document.

 

 

 

Back to top

 

V

xsl:value-of

converts a sequence specified by select to values copied into the result.

xsl:variable

defines a named variable assigned values, strings or entire code blocks.

 

 

 

Back to top

 

W

xsl:when

is always a child of xsl:choose and may have other xsl:when instructions and a single following sibling xsl:otherwise.

xsl:with-param

passes a value to a local parameter already defined in the template.

 

 

 

Back to top

   

  

back to top