Reputation: 2318
I have 2 elements:
I would like to enforce the following rules:
Currently I have total connections as following:
<xs:simpleType name="TotalConnections" use="optional" default=1>
<xs:restriction base="xs:positiveInteger">
<xs:minExclusive value="0" />
<xs:maxInclusive value="8000"/>
</xs:restriction>
</xs:simpleType>
How do I link total connections with cps in my schema?
Upvotes: 0
Views: 90
Reputation: 163675
Expressing the constraint is not possible with XSD 1.0; it can be done in XSD 1.1 using assertions.
<xs:assert test="ConnectionsPerSecond le TotalConnections"/>
Even with XSD 1.1 it's not possible to define default values that are computed rather than constant.
Upvotes: 2