Sun N1 Service Provisioning System 5.1 XML Schema Reference Guide

<var> Element

The <var> element is a child of the <varlist> element, which is a child of the <component> element. The <var> element declares a component substitution variable. For each substitution variable that you want to declare, you must specify the name of the variable and its default value.

By default, a derived component inherits all of the accessible variables from its base component, including access mode, modifier, default value, and prompt. The <var> element can appear one or more times in the <varList> element.

A derived component can define additional variables by using names that are not among those variables that have been inherited from the base component. A derived component can override the prompt, default value, modifier, and access mode of a nonfinal inherited variable by re-declaring a variable with the same name. When a variable is overridden, the entire contents of the variable must be re-declared, including the prompt, default value, access mode, and modifier. Only specify the default value if the overriding variable is nonabstract. The access mode can be no more restrictive than that of the base component.

When a variable is overridden, all references to the variable evaluate to the overridden value, even those that appear in the base component.

If the derived component is declared as nonabstract, any abstract variables declared by the base component must be overridden by the derived component.

Attributes for the <var> Element

The <var> element has the following attributes: