Definition Type: Element
Name: file_state
Namespace: http://oval.mitre.org/XMLSchema/oval-definitions-5#windows
Type: oval-def:StateType
Containing Schema: windows-definitions-schema.xsd
Abstract
Documentation:
The file_state element defines the different metadata associate with a Windows file. This includes the path, filename, owner, size, last modified time, version, etc. Please refer to the individual elements in the schema for more details about what each represents.
Collapse XSD Schema Diagram:
Drilldown into product_version in schema windows-definitions-schema_xsd Drilldown into product_name in schema windows-definitions-schema_xsd Drilldown into original_filename in schema windows-definitions-schema_xsd Drilldown into language in schema windows-definitions-schema_xsd Drilldown into internal_name in schema windows-definitions-schema_xsd Drilldown into company in schema windows-definitions-schema_xsd Drilldown into development_class in schema windows-definitions-schema_xsd Drilldown into type in schema windows-definitions-schema_xsd Drilldown into version in schema windows-definitions-schema_xsd Drilldown into ms_checksum in schema windows-definitions-schema_xsd Drilldown into m_time in schema windows-definitions-schema_xsd Drilldown into c_time in schema windows-definitions-schema_xsd Drilldown into a_time in schema windows-definitions-schema_xsd Drilldown into size in schema windows-definitions-schema_xsd Drilldown into owner in schema windows-definitions-schema_xsd Drilldown into filename in schema windows-definitions-schema_xsd Drilldown into path in schema windows-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 file_state in schema windows-definitions-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="file_state" substitutionGroup="oval-def:state">
    <xsd:annotation>
        <xsd:documentation>The file_state element defines the different metadata associate with a Windows file. This includes the path, filename, owner, size, last modified time, version, etc. Please refer to the individual elements in the schema for more details about what each represents.</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">
                        <xsd:annotation>
                            <xsd:documentation>The path element specifies the absolute path to a file on the machine.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestepath" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:path">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the path entity of a file_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">
                        <xsd:annotation>
                            <xsd:documentation>The filename element specifies the name of the file.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestefilename" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:filename">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the filename entity of a file_state should be 'string'</sch:assert>
                                        <sch:assert test="if (not(@operation) or @operation='equals' or @operation='not equal') then (not(contains(.,'\') or contains(.,'/') or contains(.,':') or contains(.,'*') or contains(.,'?') or contains(.,'&gt;') or contains(.,'|'))) else (1=1)">
                                            <sch:value-of select="../@id" /> - filename entity can not contain the characters / \ : * ? &gt; | </sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="owner" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The owner element is a string that contains the name of the owner.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filesteowner" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:owner">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the owner entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="size" type="oval-def:EntityStateIntType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The size element is the size of the file in bytes.</xsd:documentation>
                            <xsd:appinfo>
                                <valid_datatypes>integer</valid_datatypes>
                                <valid_operators>equals, not equal, greater than, less than, greater than or equal, less than or equal</valid_operators>
                                <sch:pattern id="filestesize" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:size">
                                        <sch:assert test="@datatype='int'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the size entity of a file_state should be 'int'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="a_time" type="oval-def:EntityStateIntType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>Time of last access of file. Valid on NTFS but not on FAT formatted disk drives. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestea_time" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:a_time">
                                        <sch:assert test="@datatype='int'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the a_time entity of a file_state should be 'int'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="c_time" type="oval-def:EntityStateIntType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>Time of creation of file. Valid on NTFS but not on FAT formatted disk drives. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestec_time" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:c_time">
                                        <sch:assert test="@datatype='int'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the c_time entity of a file_state should be 'int'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="m_time" type="oval-def:EntityStateIntType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>Time of last modification of file. The string should represent the FILETIME structure which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestem_time" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:m_time">
                                        <sch:assert test="@datatype='int'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the m_time entity of a file_state should be 'int'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="ms_checksum" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The ms_checksum element is the md5 checksum of the file as supplied by Microsoft.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestems_checksum" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:ms_checksum">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the ms_checksum entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="version" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The version element is the delimited version string of the file.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filesteversion" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:version">
                                        <sch:assert test="@datatype='version'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the version entity of a file_state should be 'version'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="type" type="win-def:EntityStateFileTypeType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The type element marks whether the file is a directory, named pipe, standard file, etc. These types are the return values for GetFileType, with the exception of FILE_ATTRIBUTE_DIRECTORY which is obtained by looking at GetFileAttributesEx. NOTE: Should this entity be split into two in future versions of the language as there are other values associated with GetFileAttributesEx that are not represented here?</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestetype" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:type">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the type entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="development_class" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The development_class element allows the distinction to be made between the GDR development environment and the QFE development environment. This field holds the text found in front of the mmmmmm-nnnn version, for example srv03_gdr.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestedevelopment_class" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:development_class">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the development_class entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="company" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>This entity defines a company name to be found within the version-information structure.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestecompany" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:company">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the company entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="internal_name" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>This entity defines an internal name to be found within the version-information structure.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filesteinternalname" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:internal_name">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the internal_name entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="language" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>This entity defines a language to be found within the version-information structure.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filestelanguage" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:language">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the language entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="original_filename" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>This entity defines an original filename to be found within the version-information structure.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filesteoriginalfilename" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:original_filename">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the original_filename entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="product_name" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>This entity defines a product name to be found within the version-information structure.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filesteproductname" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:product_name">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the product_name entity of a file_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="product_version" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>This entity defines a product version to be found within the version-information structure.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="filesteproductversion" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="win-def:file_state/win-def:product_version">
                                        <sch:assert test="@datatype='version'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the product_version entity of a file_state should be 'string'</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 win-def:path 0 (1)
filename win-def:filename 0 (1)
owner win-def:owner 0 (1)
size win-def:size 0 (1)
a_time win-def:a_time 0 (1)
c_time win-def:c_time 0 (1)
m_time win-def:m_time 0 (1)
ms_checksum win-def:ms_checksum 0 (1)
version win-def:version 0 (1)
type win-def:type 0 (1)
development_class win-def:development_class 0 (1)
company win-def:company 0 (1)
internal_name win-def:internal_name 0 (1)
language win-def:language 0 (1)
original_filename win-def:original_filename 0 (1)
product_name win-def:product_name 0 (1)
product_version win-def:product_version 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