<element name="ValueArray" type="gml:ValueArrayType" substitutionGroup="gml:CompositeValue">
<annotation>
<appinfo>
<sch:pattern name="Check either codeSpace or uom not both" xmlns:sch="http://www.ascc.net/xml/schematron">
<sch:rule context="gml:ValueArray">
<sch:report test="@codeSpace and @uom">ValueArray may not carry both a reference to a codeSpace and a uom</sch:report>
</sch:rule>
</sch:pattern>
<sch:pattern name="Check components are homogeneous" xmlns:sch="http://www.ascc.net/xml/schematron">
<sch:rule context="gml:ValueArray">
<sch:assert test="count(gml:valueComponent/*) = count(gml:valueComponent/*[name() = name(../../gml:valueComponent[1]/*[1])])">All components of <sch:name /> must be of the same type</sch:assert>
<sch:assert test="count(gml:valueComponents/*) = count(gml:valueComponents/*[name() = name(../*[1])])">All components of <sch:name /> must be of the same type</sch:assert>
</sch:rule>
</sch:pattern>
</appinfo>
<documentation>A Value Array is used for homogeneous arrays of primitive and aggregate values. _ScalarValueList is preferred for arrays of Scalar Values since this is more efficient. Since "choice" is not available for attribute groups, an external constraint (e.g. Schematron) would be required to enforce the selection of only one of these through schema validation </documentation>
</annotation>
</element>
|