<xsd:element name="variable_item" substitutionGroup="oval-sc:item">
<xsd:annotation>
<xsd:documentation>This item stores information about OVAL Variables and their values.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-sc:ItemType">
<xsd:sequence>
<xsd:element name="var_ref" type="ind-sc:EntityItemVariableRefType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The id of the variable.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="varitemvar_ref" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="ind-sc:variable_item/ind-sc:var_ref">
<sch:assert test="not(@datatype) or @datatype='string'">item <sch:value-of select="../@id" /> - datatype attribute for the var_ref entity of a variable_item should be 'string'</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="value" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The value of the variable. If a variable represents and array of values, then multiple value elements should exist.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="varitemvalue" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="ind-sc:variable_item/ind-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>
|