apply-templates
Syntax
apply-templates expression;
Description
Apply one or more templates, according to the value
of the node-set expression. If a node-set expression is not specified,
the script recursively processes all child nodes of the current node.
If a node-set expression is specified, the processor only applies
templates to the child elements that match the node-set expression.
The template
statement dictates which elements
are transformed according to which template. The templates that are
applied are passed the parameters specified by the with
statement within the apply-templates
statement
block.
Attributes
expression |
(Optional) Selects the nodes to which the processor applies templates. By default, the processor applies templates to the child nodes of the current node. |
SLAX Example
match configuration { apply-templates system/host-name; }
XSLT Equivalent
<xsl:template match="configuration"> <xsl:apply-templates select="system/host-name"/> </xsl:template>
Usage Examples
See Example: Adding a Final then accept Term to a Firewall and Example: Prevent Import of the Full Routing Table.
Release Information
Statement introduced in version 1.0 of the SLAX language.