Definition Type: Element
Name: variable_test
Namespace: http://oval.mitre.org/XMLSchema/oval_results
Type: oval_results:testType
Containing Schema: oval-results-schema.xsd
Abstract
Documentation:
This test has been deprecated in version 4.1 of the oval-schema and will be removed completely in version 5. It is recommended that all future OVAL Content use the variable_test found in the independent schema. A variable test allows the value of a variable to be compared to a defined value. An example use would be to validate that a variable being passed in from an external source falls within a specified range.
Collapse XSD Schema Diagram:
Drilldown into item in schema oval-results-schema_xsd Drilldown into message in schema oval-results-schema_xsd Drilldown into version in schema oval-results-schema_xsd Drilldown into comment in schema oval-results-schema_xsd Drilldown into id in schema oval-results-schema_xsd Drilldown into testType in schema oval-results-schema_xsd Drilldown into result in schema oval-results-schema_xsd Drilldown into operation in schema oval-results-schema_xsdXSD Diagram of variable_test in schema oval-results-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="variable_test" substitutionGroup="oval_results:test">
    <xsd:annotation>
        <xsd:documentation>This test has been deprecated in version 4.1 of the oval-schema and will be removed completely in version 5.  It is recommended that all future OVAL Content use the variable_test found in the independent schema.</xsd:documentation>
        <xsd:documentation>A variable test allows the value of a variable to be compared to a defined value.  An example use would be to validate that a variable being passed in from an external source falls within a specified range.</xsd:documentation>
        <xsd:appinfo>
            <test_name>Variable Test</test_name>
            <extends>TestType</extends>
            <valid_sections>[message], item</valid_sections>
            <example>
                <variable_test id="vct-0" operation="AND" comment="an example variable test" version="1" result="1">
                    <item variable="var-3" version="1" datatype="int" operator="greater than" result="0">6</item>
                    <item variable="var-3" version="1" datatype="int" operator="less than" result="1">78</item>
                </variable_test>
            </example>
        </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:complexContent>
            <xsd:extension base="oval_results:testType">
                <xsd:sequence>
                    <xsd:element name="item" minOccurs="1" maxOccurs="unbounded">
                        <xsd:annotation>
                            <xsd:documentation>An 'item' element defines a specific comparison to perform on a variable.  The required 'variable' attribute provides a link to a variable to use.  The optional datatype determines the type of data expected as the value of the 'item' element.  (the default datatype is 'string')  The required 'operator' attribute defines the operator to use for the comparision.  The optional var_ref attribute refers the value of the item to a variable element.  Note that the comparision should read: '*variable* is *operator* the value of the item'.  Also note that it is implied that the datatypes of the two value being compared are the same.</xsd:documentation>
                            <xsd:appinfo>
                                <parent_test>Variable Test</parent_test>
                                <cardinality>1</cardinality>
                                <content>none</content>
                                <valid_datatypes>binary, boolean, component, float, int, string, version</valid_datatypes>
                                <valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal, bitwise and, bitwise or, pattern match</valid_operators>
                            </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:complexType>
                            <xsd:complexContent>
                                <xsd:extension base="xsd:anyType">
                                    <xsd:attribute name="variable" type="oval_results:varid" use="required" />
                                    <xsd:attribute name="variable_version" type="oval_results:versionType" use="optional" default="1" />
                                    <xsd:attribute name="datatype" type="oval_results:datatypes" use="optional" default="string" />
                                    <xsd:attribute name="operator" type="oval_results:operators" use="optional" default="equals" />
                                    <xsd:attribute name="var_ref" type="oval_results:varid" use="optional" />
                                    <xsd:attribute name="version" type="oval_results:versionType" use="optional" default="1" />
                                    <xsd:attribute name="result" type="oval_results:resultType" use="required" />
                                </xsd:extension>
                            </xsd:complexContent>
                        </xsd:complexType>
                    </xsd:element>
                </xsd:sequence>
                <xsd:attribute name="operation" type="oval_results:operations" use="required" />
                <xsd:attribute name="result" type="oval_results:resultType" use="required" />
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
</xsd:element>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
message oval_results:message 0 unbounded
item oval_results:item 1 unbounded
Collapse Child Attributes:
Name Type Default Value Use
id oval_results:id Required
comment oval_results:comment Required
version oval_results:version 1 Optional
operation oval_results:operation Required
result oval_results:result Required
Collapse Derivation Tree:
Collapse References:
oval_results:test