Definition Type: Element
Name: compound_test
Namespace: http://oval.mitre.org/XMLSchema/oval#independent
Type: oval:testType
Containing Schema: independent-schema.xsd
Abstract
Documentation:
A compound test allows multiple tests (including other compound tests) to be joined together by a logical operator. This provides flexibility in test creation and enables complex tests to be reused, serving as building blocks for future tests. The required operation attribute specifies how to logically combine the numerous subtests of a compound test. Possible values are: AND, OR, XOR. A value of AND means that each subtest must be true for the compound_test to return true. A value of OR means that only one subtest must be true for the compound_test to return true. A value of XOR means that one, and only one, subtest must be true for the compound_test to return true. A compound test extends the testType. Please refer to the "Complex Types" section of this document for a description of the testType.
Collapse XSD Schema Diagram:
Drilldown into subtest in schema independent-schema_xsd Drilldown into notes in schema oval-schema_xsd Drilldown into comment in schema oval-schema_xsd Drilldown into id in schema oval-schema_xsd Drilldown into testType in schema oval-schema_xsd Drilldown into operation in schema independent-schema_xsdXSD Diagram of compound_test in schema independent-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="compound_test" substitutionGroup="oval:test">
    <xsd:annotation>
        <xsd:documentation>A compound test allows multiple tests (including other compound tests) to be joined together by a logical operator.  This provides flexibility in test creation and enables complex tests to be reused, serving as building blocks for future tests.  The required operation attribute specifies how to logically combine the numerous subtests of a compound test.  Possible values are: AND, OR, XOR.  A value of AND means that each subtest must be true for the compound_test to return true.  A value of OR means that only one subtest must be true for the compound_test to return true.  A value of XOR means that one, and only one, subtest must be true for the compound_test to return true.  A compound test extends the testType.  Please refer to the "Complex Types" section of this document for a description of the testType.</xsd:documentation>
        <xsd:appinfo>
            <test_name>Compound Test</test_name>
            <extends>testType</extends>
            <valid_sections>[notes], subtest</valid_sections>
            <example>
                <compound_test id="cmp-0" operation="AND" comment="an example compound test" xmlns="http://oval.mitre.org/XMLSchema/oval#independent">
                    <oval:notes xmlns:oval="http://oval.mitre.org/XMLSchema/oval">
                        <oval:note>This is an example compound test.  It ANDs together the results of three separate tests, one of which is negated.</oval:note>
                    </oval:notes>
                    <subtest test_ref="wrt-0" />
                    <subtest test_ref="wat-0" negate="true" />
                    <subtest test_ref="cmp-1" />
                </compound_test>
            </example>
        </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:complexContent>
            <xsd:extension base="oval:testType">
                <xsd:sequence>
                    <xsd:element name="subtest" minOccurs="1" maxOccurs="unbounded">
                        <xsd:annotation>
                            <xsd:documentation>The subtest element specifies a particular test to be referenced.  The required test_ref attribute accomplishes this by linking to a valid test id.  The optional 'negate' attribute signifies that the result of an individual test should be negated during analysis.  For example, consider a test that returns TRUE if a specific patch is installed.  By negating this test, it now analyzes to TRUE if the patch is NOT installed.</xsd:documentation>
                            <xsd:appinfo>
                                <parent_test>Compound Test</parent_test>
                                <cardinality>1-n</cardinality>
                                <content>none</content>
                            </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:complexType>
                            <xsd:attribute name="test_ref" type="oval:testid" use="required" />
                            <xsd:attribute name="negate" type="xsd:boolean" use="optional" default="false" />
                        </xsd:complexType>
                    </xsd:element>
                </xsd:sequence>
                <xsd:attribute name="operation" type="oval:operations" use="required" />
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
</xsd:element>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
notes oval:notes 0 1
subtest independent:subtest 1 unbounded
Collapse Child Attributes:
Name Type Default Value Use
id oval:id Required
comment oval:comment Required
operation independent:operation Required
Collapse Derivation Tree:
Collapse References:
oval:test