Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

match

Syntax

match expression {
statements;
}

Release Information

Statement introduced in version 1.0 of the SLAX language.

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

match host-name {
    <hello> .;
}

XSLT Equivalent

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

Usage Examples

Example: Adding a Final then accept Term to a Firewall, Example: Configuring Dual Routing Engines, and Example: Preventing Import of the Full Routing Table.

Published: 2013-03-05