match

Syntax

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 whole document.

expression—Specifies a pattern against which nodes are matched.

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

See all examples listed in Commit Script Examples.

Related Topics