Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

import

 

Syntax

Release Information

Statement introduced in version 1.0 of the SLAX language.

Description

Import rules from an external file or style sheet, which provide access to all the declarations and templates within the imported item. Any import statements must be the first elements in the script or style sheet. The path can be any URI. The path ../import/junos.xsl is standard for all commit scripts, op scripts, and event scripts.

Imported rules are overwritten by any subsequent matching rules within the importing script. If more than one file or style sheet is imported, the items imported last override each previous import where the rules match.

Attributes

hrefSpecifies the location of the imported file or style sheet.

SLAX Example

In the example, the main script imports the file route-rules.slax, which contains a template rule for <route> elements.