Definition Type: Element
Name: sql_item
Namespace: http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent
Type: oval-sc:ItemType
Containing Schema: independent-system-characteristics-schema.xsd
Abstract
Documentation:
The sql_item outlines information collected from a database via an SQL query.
Collapse XSD Schema Diagram:
Drilldown into result in schema independent-system-characteristics-schema_xsd Drilldown into sql in schema independent-system-characteristics-schema_xsd Drilldown into connection_string in schema independent-system-characteristics-schema_xsd Drilldown into version in schema independent-system-characteristics-schema_xsd Drilldown into engine in schema independent-system-characteristics-schema_xsd Drilldown into message in schema oval-system-characteristics-schema_xsd Drilldown into status in schema oval-system-characteristics-schema_xsd Drilldown into id in schema oval-system-characteristics-schema_xsd Drilldown into ItemType in schema oval-system-characteristics-schema_xsdXSD Diagram of sql_item in schema independent-system-characteristics-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<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>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
message oval-sc:message 0 1
engine ind-sc:engine 0 1
version ind-sc:version 0 1
connection_string ind-sc:connection_string 0 1
sql ind-sc:sql 0 1
result ind-sc:result 0 unbounded
Collapse Child Attributes:
Name Type Default Value Use
id oval-sc:id Required
status oval-sc:status exists Optional
Collapse Derivation Tree:
Collapse References:
oval-sc:item