Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
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

match

date_range 10-Feb-21

Syntax

content_copy zoom_out_map
match expression {
   statements;
}

Description

Declare a template that contains rules to apply when a specified node is matched. The match statement associates the template with an XML element. The match statement can also be used to define a template for a whole branch of the XML document For example, match / matches the root element of the document.

Attributes

expression

XPath expression specifying the nodes to which to apply the template.

SLAX Example

content_copy zoom_out_map
match host-name {
    <hello> .;
}

XSLT Equivalent

content_copy zoom_out_map
<xsl:template match="host-name">
    <hello>
        <xsl:value-of select="."/>
    </hello>
</xsl:template>

Release Information

Statement introduced in version 1.0 of the SLAX language.

footer-navigation