N1 Grid Service Provisioning System 5.0 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. You must specify the name of the variable and a default value for each substitution variable that you want to declare.

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 the 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 prompt, default value, access mode, and modifier. The default value is specified only if the overriding variable is nonabstract. The access mode can be no more restrictive than the base component mode.

When a variable is overridden, all references to the variable evaluate to the overridden value, including those 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: