<xsd:element name="variable">
<xsd:annotation>
<xsd:documentation>A variable element is a reference to some value that can be used by tests to compare against. One of the main benefits of variables is that they allow tests to be compared to user-defined policy. For example, an OVAL test might check to see if a password is at least a certain number of characters, but this number depends upon the individual policy of the user. To solve this, the test for password length can be written to refer to a variable element. This variable element refers to an external value (linked by the id) that can be passed in by the user when the OVAL definition is evaluated. The required id attribute uniquely identifies each variable. It is of the form var-#. The three letter code 'var' is followed by an unspecified number of digits, for example 'var-123'. The required datatype attribute specifies the type of value to expect in the external source. The required source attribute determines where the value of the variable will be found, either from some external source or as a constant declaration. When the source of the value is external, the id is used to link the variable element to the external source of the value. The required comment attribute provides a short description of the variable.
</xsd:documentation>
<xsd:appinfo>
<cardinality>1-n</cardinality>
<attributes>id, datatype, source, comment</attributes>
<content>none</content>
<parent_elements>variables</parent_elements>
<child_elements>[restricted], [value]</child_elements>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element ref="oval:restricted" />
<xsd:element ref="oval:value" />
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="id" type="oval:varid" use="required" />
<xsd:attribute name="datatype" type="oval:datatypes" use="required" />
<xsd:attribute name="source" type="oval:variable_source" use="required" />
<xsd:attribute name="comment" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
|