Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

attribute-set

 

Syntax

Release Information

Statement introduced in version 1.1 of the SLAX language, which is supported in Junos OS Release 12.2 and later releases.

Description

Define a collection of attributes that can be used repeatedly. The attribute-set statement must be defined as a top-level statement in the script. The attribute set name is a string argument. The attribute set contents define the attributes to include in the collection. The contents can include individual attribute statements, which define attributes as a name and value pair, and they can include use-attribute-sets statements, which add the attributes from a previously defined attribute set to the current set.

To apply the attributes in an attribute set to a specific element, include the use-attribute-sets statement under that element and reference the attribute set name.

Attributes

attribute-set-nameName of the attribute set, which must be a string. To add the attribute set to an element, reference this name in the use-attribute-sets statement.
attribute-nameName of the individual attribute to add to the set.
attribute-valueA block of statements enclosed in curly braces that defines the attribute value.

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.

XSLT Equivalent