Definition Type: Element
Name: subexpression
Namespace: http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent
Type: oval-sc:EntityItemAnyType
Containing Schema: independent-system-characteristics-schema.xsd
MinOccurs 0
MaxOccurs unbounded
Abstract
Documentation:
The subexpression entity represents the value of a subexpression in the specified pattern. If multiple subexpressions are specified in the pattern, then multiple entities are presented. Note that the textfilecontent_state in the definition schema only allows a single subexpression entity. This means that the test will check that all (or at least one, none, etc.) the subexpressions pass the same check. This means that the order of multiple subexpression entities in the item does not matter.
Collapse XSD Schema Diagram:
Drilldown into status in schema oval-system-characteristics-schema_xsd Drilldown into mask in schema oval-system-characteristics-schema_xsd Drilldown into datatype in schema oval-system-characteristics-schema_xsd Drilldown into EntityItemBaseType in schema oval-system-characteristics-schema_xsd Drilldown into EntityItemAnyType in schema oval-system-characteristics-schema_xsdXSD Diagram of subexpression in schema independent-system-characteristics-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="subexpression" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
    <xsd:annotation>
        <xsd:documentation>The subexpression entity represents the value of a subexpression in the specified pattern.  If multiple subexpressions are specified in the pattern, then multiple entities are presented.  Note that the textfilecontent_state in the definition schema only allows a single subexpression entity.  This means that the test will check that all (or at least one, none, etc.) the subexpressions pass the same check.  This means that the order of multiple subexpression entities in the item does not matter.</xsd:documentation>
        <xsd:appinfo>
            <sch:pattern id="txtitemsubexpression" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                <sch:rule context="ind-sc:textfilecontent_item/ind-sc:subexpression">
                    <sch:assert test="(@datatype='int' and (floor(.) = number(.))) or not(@datatype='int') or not(node())">
                        <sch:value-of select="../@id" /> - The datatype has been set to 'int' but the value is not an integer.</sch:assert>
                    <!-- we can use the xpath 2.0 function matches() to define assertions for other datatypes -->
                </sch:rule>
            </sch:pattern>
        </xsd:appinfo>
    </xsd:annotation>
</xsd:element>
Collapse Child Attributes:
Name Type Default Value Use
datatype oval-sc:datatype string Optional
mask oval-sc:mask false Optional
status oval-sc:status exists Optional
Collapse Derivation Tree: