<xsd:element name="registry_item" substitutionGroup="oval-sc:item">
<xsd:annotation>
<xsd:documentation>The windows registry item specifies information that can be collected about a particular registry key.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-sc:ItemType">
<xsd:sequence>
<xsd:element name="hive" type="win-sc:EntityItemRegistryHiveType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The hive that the registry key belongs to.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="regitemhive" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="win-sc:registry_item/win-sc:hive">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the hive entity of a registry_item should be 'string'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="key" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
<xsd:annotation>
<xsd:documentation>This element describes a registry key to be gathered. Note that the hive portion of the string should not be inclueded, as this data can be found under the hive element. If the nillable attribute is set to true, then the item being represented is the higher level hive. Using xsi:nil here will result in a status of 'does not exist' for the type, and value entities since these entities are not associated with a hive by itself. Note that when nil is used for the key element, the name element should also be nilled.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="regitemkey" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="win-sc:registry_item/win-sc:key">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the key entity of a registry_item should be 'string'</sch:assert>
<sch:assert test="not(@xsi:nil='true') or ../win-sc:name/@xsi:nil='true'">
<sch:value-of select="../@id" /> - name entity must be nil when key is nil</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1" nillable="true">
<xsd:annotation>
<xsd:documentation>This element describes the name of a registry key. If the nillable attribute is set to true, then the item being represented is the higher level key. Using xsi:nil here will result in a status of 'does not exist' for the type, and value entities since these entities are not associated with a key by itself.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="regitemname" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="win-sc:registry_item/win-sc:name">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the name entity of a registry_item should be 'string'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="type" type="win-sc:EntityItemRegistryTypeType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies the type of data stored by the registry key. Please refer to the EntityItemRegistryTypeType for more information about the different possible types.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="regitemtype" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="win-sc:registry_item/win-sc:type">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the type entity of a registry_item should be 'string'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="value" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The value entity holds the actual value of the specified registry key. The representation of the value as well as the associated datatype attribute depends on type of data stored in the registry key. If the specified registry key is of type REG_BINARY, then the datatype attribute should be set to 'binary' and the data represented by the value entity should follow the xsd:hexBinary form. (each binary octet is encoded as two hex digits) If the registry key is of type REG_DWORD or REG_QWORD, then the datatype attribute should be set to 'int' and the value entity should represent the data as an integer. If the specified registry key is of type REG_EXPAND_SZ, then the datatype attribute should be set to 'string' and the pre-expanded string should be represented by the value entity. If the specified registry key is of type REG_MULTI_SZ, then multiple value entities should exist to describe the array of strings, with each value element holds a single string. In the end, there should be the same number of value entities as there are strings in the reg_multi_sz array. If the specified registry key is of type REG_SZ, then the datatype should be 'string' and the value entity should be a copy of the string.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="regitemvalue" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="win-sc:registry_item/win-sc:value">
<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>
|