use-attribute-sets
Syntax
use-attribute-sets attribute-set-name;
Description
Add the attributes in the attribute set to the
current element. The use-attribute-sets statement can be used under the attribute‑set, copy‑node, and element statements, as well as under a normal element.
Attributes
attribute-set-name |
Name of the attribute set,
which is defined using an |
SLAX Example
The following example creates two attribute sets: table-attributes and table-attributes-ext. The table-attributes-ext set includes
all of the attributes that are already defined in the table-attributes set through use of the use-attributes-sets statement. In the main script body,
the table-attributes-ext attribute set
is applied to the <table> element. The <table> element includes the four attributes: order, cellpadding, cellspacing, and border.
version 1.1;
var $cellpadding = "0";
var $cellspacing = "10";
attribute-set table-attributes {
attribute "order" { expr "0"; }
attribute "cellpadding" { expr $cellpadding; }
attribute "cellspacing" { expr $cellspacing; }
}
attribute-set table-attributes-ext {
use-attribute-sets table-attributes;
attribute "border" { expr "0"; }
}
match / {
...
<table> {
use-attribute-sets table-attributes-ext;
}
}Release Information
Statement introduced in version 1.1 of the SLAX language, which is supported in Junos OS Release 12.2 and later releases.