Definition Type: Element
Name: textfilecontent54_state
Namespace: http://oval.mitre.org/XMLSchema/oval-definitions-5#independent
Type: oval-def:StateType
Containing Schema: independent-definitions-schema.xsd
Abstract
Documentation:
The textfilecontent54_state element contains entities that are used to check the file path and name, as well as the text block in question and the value of the subexpressions.
Collapse XSD Schema Diagram:
Drilldown into subexpression in schema independent-definitions-schema_xsd Drilldown into instance in schema independent-definitions-schema_xsd Drilldown into pattern 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 textfilecontent54_state in schema independent-definitions-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="textfilecontent54_state" substitutionGroup="oval-def:state">
    <xsd:annotation>
        <xsd:documentation>The textfilecontent54_state element contains entities that are used to check the file path and name, as well as the text block in question and the value of the subexpressions.</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>The path entity represents the absolute path to a file on the machine.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="txt54stepath" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent54_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 filename entity represents the name of a file.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="txt54stefilename" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent54_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 textfilecontent54_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="pattern" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>The pattern entity represents a regular expression that is used to define a block of text.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="txt54stepattern" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent54_state/ind-def:pattern">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the pattern entity of a textfilecontent54_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="instance" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
                        <xsd:annotation>
                            <xsd:documentation>The instance entity calls out a specific match of the pattern.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="txt54steinstance" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent54_state/ind-def:instance">
                                        <sch:assert test="@datatype='int'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the instance entity of a textfilecontent54_state should be 'int'</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>The subexpression entity represents a value to test against the subexpression in the specified pattern. If multiple subexpressions are specified in the pattern, this value tested against all of them. For example, if the pattern abc(.*)mno(.*)xyp was supplied, and the state specifies a subexpression value of enabled, then the test would check that both (or at least one, none, etc. depending on the entity_check attribute) of the subexpressions have a value of enabled. </xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="txt54stesubexpression" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:textfilecontent54_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>
                                    </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
pattern ind-def:pattern 0 1
instance ind-def:instance 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