<xsd:element name="sql_item" substitutionGroup="oval-sc:item">
<xsd:annotation>
<xsd:documentation>The sql_item outlines information collected from a database via an SQL query.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-sc:ItemType">
<xsd:sequence>
<xsd:element name="engine" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The engine entity identifies the specific database engine used to connect to the database.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="sqlitemengine" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="ind-sc:sql_item/ind-sc:engine">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the engine entity of an sql_item should be 'string'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="version" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The version entity identifies the version of the database engine used to connect to the database.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="sqlitemversion" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="ind-sc:sql_item/ind-sc:version">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the version entity of an sql_item should be 'string'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="connection_string" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The connection_string entity defines connection parameters used to connect to the specific database.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="sqlitemconnection_string" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="ind-sc:sql_item/ind-sc:connection_string">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the connection_string entity of an sql_item should be 'string'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="sql" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The sql entity holds the specific query used to identify the object(s) in the database.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="sqlitemsql" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="ind-sc:sql_item/ind-sc:sql">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the sql entity of an sql_item should be 'string'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="result" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The result entity specifies the result(s) of the given SQL query against the database.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="sqlitemresult" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="ind-sc:sql_item/ind-sc:result">
<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>
|