ON THIS PAGE
apply-imports
Syntax
apply-imports;
Description
Apply a template rule from an external file or style sheet. By default, template rules in the main script have precedence over equivalent imported template rules. Use this statement to process the context node using the imported match template rule from the external source.
The apply‑imports
statement mimics
the <xsl:apply‑imports>
element, allowing
the script to invoke any imported templates.
SLAX Example
In the example, the main script imports the file route-rules.slax. The apply-imports
statement invokes the imported template rule for <route>
elements.
version 1.1; import "route-rules.slax"; match route { <routes> { apply-imports; } }
The imported file contains a template rule for <route>
elements.
/* route-rules.slax */ version 1.1; match route { <new> { apply-templates *[@changed]; } }
Release Information
Statement introduced in version 1.1 of the SLAX language, which is supported in Junos OS Release 12.2 and later releases.