Definition Type: Element
Name: variable
Namespace: http://oval.mitre.org/XMLSchema/oval_results
Containing Schema: oval-results-schema.xsd
Abstract
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 was be found, either from some external source or as a constant declaration. The required comment attribute provides a short description of the variable.
Collapse XSD Schema Diagram:
Drilldown into value in schema oval-results-schema_xsd Drilldown into comment in schema oval-results-schema_xsd Drilldown into source in schema oval-results-schema_xsd Drilldown into datatype in schema oval-results-schema_xsd Drilldown into version in schema oval-results-schema_xsd Drilldown into id in schema oval-results-schema_xsdXSD Diagram of variable in schema oval-results-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<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 was be found, either from some external source or as a constant declaration.  The required comment attribute provides a short description of the variable.
</xsd:documentation>
        <xsd:appinfo>
            <cardinality>1-n</cardinality>
            <attributes>id, [version], datatype, source, comment</attributes>
            <content>none</content>
            <parent_elements>variables</parent_elements>
            <child_elements>[value]</child_elements>
        </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element ref="oval_results:value" minOccurs="0" maxOccurs="1" />
        </xsd:sequence>
        <xsd:attribute name="id" type="oval_results:varid" use="required" />
        <xsd:attribute name="version" type="oval_results:versionType" use="optional" default="1" />
        <xsd:attribute name="datatype" type="oval_results:datatypes" use="required" />
        <xsd:attribute name="source" type="oval_results:variable_source" use="required" />
        <xsd:attribute name="comment" type="xsd:string" use="required" />
    </xsd:complexType>
</xsd:element>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
value oval_results:value 0 1
Collapse Child Attributes:
Name Type Default Value Use
id oval_results:id Required
version oval_results:version 1 Optional
datatype oval_results:datatype Required
source oval_results:source Required
comment oval_results:comment Required