Definition Type: Element
Name: textfilecontent_test
Namespace: http://oval.mitre.org/XMLSchema/oval#macos
Type: oval:standardTestType
Containing Schema: macos-schema.xsd
Abstract
Documentation:
This test has been deprecated in version 4.1 of the macos-schema and will be removed completely in version 5. It is recommended that all future OVAL Content use the textfilecontent_test found in the independent-schema. This test allows you to check a file's content, basically by serving as a flexible, regular-expression enabled 'grep'. grep checks for the existence of a line matching a given pattern in a file.
Collapse XSD Schema Diagram:
Drilldown into data in schema macos-schema_xsd Drilldown into object in schema macos-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 check in schema oval-schema_xsd Drilldown into standardTestType in schema oval-schema_xsdXSD Diagram of textfilecontent_test in schema macos-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="textfilecontent_test" substitutionGroup="oval:test">
    <xsd:annotation>
        <xsd:documentation>This test has been deprecated in version 4.1 of the macos-schema and will be removed completely in version 5.  It is recommended that all future OVAL Content use the textfilecontent_test found in the independent-schema.</xsd:documentation>
        <xsd:documentation>This test allows you to check a file's content, basically by serving as a flexible, regular-expression enabled 'grep'.  grep checks for the existence of a line matching a given pattern in a file.</xsd:documentation>
        <xsd:appinfo>
            <test_name>Text File Content Test</test_name>
            <extends>standardTestType</extends>
            <valid_sections>notes, object, data</valid_sections>
            <example>
            </example>
        </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:complexContent>
            <xsd:extension base="oval:standardTestType">
                <xsd:sequence>
                    <xsd:element name="object" minOccurs="1" maxOccurs="1">
                        <xsd:complexType>
                            <xsd:complexContent>
                                <xsd:extension base="oval:objectType">
                                    <xsd:sequence>
                                        <xsd:element name="path" type="macos:componentType" minOccurs="1" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>Specifies the absolute path to a file on the machine.  This path can be created from multiple components that are added together.  When a pattern match operator is used, the corresponding regular expression is matched against the set of absolute path strings.  These string would not include the '.' and '..' notations.  This means that a '.*' component of a regular expression will not only match all files in the specified directories, but all subdirectories, their subdirectories, etc.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>Text File Content Test</parent_test>
                                                    <cardinality>1</cardinality>
                                                    <content>none</content>
                                                    <valid_datatypes>component</valid_datatypes>
                                                    <valid_operators>equals, not equal, pattern match</valid_operators>
                                                </xsd:appinfo>
                                            </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element name="line" type="oval:subtestStringType" minOccurs="1" maxOccurs="1" nillable="true">
                                            <xsd:annotation>
                                                <xsd:documentation>The line element represents a line in the file and is represented using a regular expression.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>Text File Content Test</parent_test>
                                                    <cardinality>1</cardinality>
                                                    <content>string</content>
                                                    <valid_datatypes>string</valid_datatypes>
                                                    <valid_operators>pattern match</valid_operators>
                                                </xsd:appinfo>
                                            </xsd:annotation>
                                        </xsd:element>
                                    </xsd:sequence>
                                </xsd:extension>
                            </xsd:complexContent>
                        </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="data" minOccurs="0" maxOccurs="1">
                        <xsd:complexType>
                            <xsd:complexContent>
                                <xsd:extension base="oval:dataType">
                                    <xsd:sequence>
                                        <xsd:element name="subexpression" type="oval:subtestStringType" minOccurs="0" maxOccurs="unbounded">
                                            <xsd:annotation>
                                                <xsd:documentation>Each subexpression in the regular expression of the line element is then tested against the value specified in the subexpression element.</xsd:documentation>
                                                <xsd:appinfo>
                                                    <parent_test>Text File Content Test</parent_test>
                                                    <cardinality>0-n</cardinality>
                                                    <content>string</content>
                                                    <valid_datatypes>string</valid_datatypes>
                                                    <valid_operators>equals, not equal, pattern match</valid_operators>
                                                </xsd:appinfo>
                                            </xsd:annotation>
                                        </xsd:element>
                                    </xsd:sequence>
                                </xsd:extension>
                            </xsd:complexContent>
                        </xsd:complexType>
                    </xsd:element>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
</xsd:element>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
notes oval:notes 0 1
object macos:object 1 1
data macos:data 0 1
Collapse Child Attributes:
Name Type Default Value Use
id oval:id Required
comment oval:comment Required
check oval:check all Optional
Collapse Derivation Tree:
Collapse References:
oval:test