Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Automation Scripting User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

apply-templates

date_range 13-Jan-21

Syntax

content_copy zoom_out_map
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

content_copy zoom_out_map
match configuration {
    apply-templates system/host-name;
}

XSLT Equivalent

content_copy zoom_out_map
<xsl:template match="configuration">
    <xsl:apply-templates select="system/host-name"/>
</xsl:template>

Release Information

Statement introduced in version 1.0 of the SLAX language.

footer-navigation