<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>
|