XSLT <xsl:template>
Element
Definition and Usage
The <xsl:template>
element contains the rules to be applied when a specified node is matched.
The match
attribute is used to associate the template with an XML element. The match
attribute can also be used to define templates for entire branches of an XML document (e.g., match="/"
defines the entire document).
Note: <xsl:template>
is a top-level element.
Syntax
Attributes
Attribute | Value | Description |
---|---|---|
name | name | Optional. Defines a name for the template. Note: If this attribute is omitted, the match attribute must be set. |
match | pattern | Optional. The match pattern for the template. Note: If this attribute is omitted, the name attribute must be set. |
mode | mode | Optional. Specifies a mode for the template. |
priority | number | Optional. A number representing the priority of the template. |