Template Matching Overview for SLAX
You apply match templates using the apply-templates statement. This statement accepts an optional XPath expression, which is equivalent to the select attribute in an <xsl:apply-templates> element.
match configuration {
apply-templates system/host-name;
}
match host-name {
<hello> .;
}The XSLT equivalent:
<xsl:template match="configuration">
<xsl:apply-templates select="system/host-name"/>
</xsl:template>
<xsl:template match="host-name">
<hello>
<xsl:value-of select="."/>
</hello>
</xsl:template>
Hide Navigation Pane
Show Navigation Pane
Download
SHA1