Definition Type: Element
Name: pattern
Namespace: http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent
Type: oval-sc:EntityItemStringType
Containing Schema: independent-system-characteristics-schema.xsd
MinOccurs 0
MaxOccurs 1
Abstract
Documentation:
The pattern entity represents a regular expression that is used to define a block of text. Subexpression notation (parenthesis) is used to call out a value(s) to test against. For example, the pattern abc(.*)xyz would look for a block of text in the file that starts with abc and ends with xyz, with the subexpression being all the characters that exist inbetween. Note that if the pattern can match more than one block of text starting at the same point, then it matches the longest. Subexpressions also match the longest possible substrings, subject to the constraint that the whole match be as long as possible, with subexpressions starting earlier in the pattern taking priority over ones starting later.
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 EntityItemStringType in schema oval-system-characteristics-schema_xsdXSD Diagram of pattern in schema independent-system-characteristics-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="pattern" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
    <xsd:annotation>
        <xsd:documentation>The pattern entity represents a regular expression that is used to define a block of text.  Subexpression notation (parenthesis) is used to call out a value(s) to test against.  For example, the pattern abc(.*)xyz would look for a block of text in the file that starts with abc and ends with xyz, with the subexpression being all the characters that exist inbetween.  Note that if the pattern can match more than one block of text starting at the same point, then it matches the longest. Subexpressions also match the longest possible substrings, subject to the constraint that the whole match be as long as possible, with subexpressions starting earlier in the pattern taking priority over ones starting later.</xsd:documentation>
        <xsd:appinfo>
            <sch:pattern id="txtitempattern" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                <sch:rule context="ind-sc:textfilecontent_item/ind-sc:pattern">
                    <sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the pattern entity of a textfilecontent_item should be 'string'</sch:assert>
                </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: