Definition Type: Element
Name: sql_state
Namespace: http://oval.mitre.org/XMLSchema/oval-definitions-5#independent
Type: oval-def:StateType
Containing Schema: independent-definitions-schema.xsd
Abstract
Documentation:
The sql_state element contains two entities that are used to check the name of the specified environment varible and the value associated with it.
Collapse XSD Schema Diagram:
Drilldown into result in schema independent-definitions-schema_xsd Drilldown into sql in schema independent-definitions-schema_xsd Drilldown into connection_string in schema independent-definitions-schema_xsd Drilldown into version in schema independent-definitions-schema_xsd Drilldown into engine in schema independent-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 sql_state in schema independent-definitions-schema_xsd (Open Vulnerability and Assessment Language (OVAL®))
Collapse XSD Schema Code:
<xsd:element name="sql_state" substitutionGroup="oval-def:state">
    <xsd:annotation>
        <xsd:documentation>The sql_state element contains two entities that are used to check the name of the specified environment varible and the value associated with it.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:complexContent>
            <xsd:extension base="oval-def:StateType">
                <xsd:sequence>
                    <xsd:element name="engine" type="ind-def:EntityObjectEngineType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The engine entity defines a specific database engine.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="sqlsteengine" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:sql_state/ind-def:engine">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the engine entity of an sql_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 entity defines a specific version of a given database engine.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="sqlsteversion" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:sql_state/ind-def:version">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the version entity of an sql_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="connection_string" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The connection_string entity defines a set of parameters that help identify the connection to the database.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="sqlsteconnection_string" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:sql_state/ind-def:connection_string">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the connection_string entity of an sql_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="sql" type="oval-def:EntityStateStringType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>the sql entity defines a query used to identify the object(s) to test against.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="sqlstesql" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:sql_state/ind-def:sql">
                                        <sch:assert test="not(@datatype) or @datatype='string'">
                                            <sch:value-of select="../@id" /> - datatype attribute for the sql entity of a sql_state should be 'string'</sch:assert>
                                    </sch:rule>
                                </sch:pattern>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="result" type="oval-def:EntityStateAnyType" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>The result entity specifies how to test objects in the result set of the specified SQL statement. Only one comparable field is allowed. So if the SQL statement look like 'SELECT name FROM ...', then a result entity with a value of 'Fred' would test the set of 'name' values returned by the SQL statement against the value 'Fred'.</xsd:documentation>
                            <xsd:appinfo>
                                <sch:pattern id="sqlsteresult" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
                                    <sch:rule context="ind-def:sql_state/ind-def: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
Signature ds:Signature 0 1
notes oval-def:notes 0 1
engine ind-def:engine 0 (1)
version ind-def:version 0 (1)
connection_string ind-def:connection_string 0 (1)
sql ind-def:sql 0 (1)
result ind-def:result 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