<xsd:element name="subexpression" type="oval-sc:EntityItemAnyType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The subexpression entity represents the value of a subexpression in the specified pattern. If multiple subexpressions are specified in the pattern, then multiple entities are presented. Note that the textfilecontent_state in the definition schema only allows a single subexpression entity. This means that the test will check that all (or at least one, none, etc.) the subexpressions pass the same check. This means that the order of multiple subexpression entities in the item does not matter.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="txtitemsubexpression" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="ind-sc:textfilecontent_item/ind-sc:subexpression">
<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>
<!-- we can use the xpath 2.0 function matches() to define assertions for other datatypes -->
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
|