Definition Type: Element
Name: textfilecontent_state
Namespace: http://oval.mitre.org/XMLSchema/oval-definitions-5#independent
Type: oval-def:StateType
Containing Schema: independent-definitions-schema.xsd
Abstract
Documentation:
This state has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer textfilecontent54_state. The textfilecontent_state element contains entities that are used to check the file path and name, as well as the line in question and the value of the specific subexpression.
Collapse XSD Schema Diagram:
Drilldown into subexpression in schema independent-definitions-schema_xsd Drilldown into line in schema independent-definitions-schema_xsd Drilldown into filename in schema independent-definitions-schema_xsd Drilldown into path in schema independent-definitions-schema_xsd Drilldown into notes in schema oval-definitions-schema_xsd Drilldown into Signature in schema xmldsig-core-schema_xsd Drilldown into deprecated in schema oval-definitions-schema_xsd Drilldown into comment in schema oval-definitions-schema_xsd Drilldown into operator in schema oval-definitions-schema_xsd Drilldown into version in schema oval-definitions-schema_xsd Drilldown into id in schema oval-definitions-schema_xsd Drilldown into StateType in schema oval-definitions-schema_xsdXSD Diagram of textfilecontent_state in schema independent-definitions-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="textfilecontent_state" substitutionGroup="oval-def:state">
    <xsd:annotation>
        <xsd:documentation>This state has been deprecated and will be removed in version 6.0 of the language. Recommend use of the newer textfilecontent54_state.</xsd:documentation>
        <xsd:documentation>The textfilecontent_state element contains entities that are used to check the file path and name, as well as the line in question and the value of the specific subexpression.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:complexContent>
            <xsd:extension base="oval-def:StateType">
                <xsd:sequence>
                    <xsd:element name="path" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>Specifies the absolute path to a file on the machine.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="txtstepath" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent_state/ind-def:path">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the path entity of a textfilecontent_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="filename" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>The name of the file.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="txtstefilename" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent_state/ind-def:filename">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the filename entity of a textfilecontent_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="line" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>The line element represents a line in the file that was collected.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="txtsteline" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent_state/ind-def:line">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the line entity of a textfilecontent_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="subexpression" type="oval-def:EntityStateAnyType" minOccurs="0" maxOccurs="1">
                        <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>
                                <sch:pattern id="txtstesubexpression" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent_state/ind-def: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>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
</xsd:element>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
Signature ds:Signature 0 1
notes oval-def:notes 0 1
path ind-def:path 0 1
filename ind-def:filename 0 1
line ind-def:line 0 1
subexpression ind-def:subexpression 0 1
Collapse Child Attributes:
Name Type Default Value Use
id oval-def:id Required
version oval-def:version Required
operator oval-def:operator AND Optional
comment oval-def:comment Optional
deprecated oval-def:deprecated false Optional
Collapse Derivation Tree:
Collapse References:
oval-def:state