Greg Faron
Usenet Archive
- Joined
- Feb 21, 2000
- Messages
- 20
- Reaction score
- 0
I'm trying to add a restriction to an integer value, in that the restriction is related to the current value in a sibling node. Is this even possible? I get the error "Invalid value for datatype integer in attribute 'value'" during validation. See the documentation comments below for more information about the exact relationships.
<xs:complexType name="integerParameterType">
<xs:sequence>
<xs:element name="name">
<xs:annotation>
<xs:documentation>The name must not contain whitespace and must begin with an alphabetic character.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs
attern value="[a-zA-Z]\S*"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="min"> <xs:annotation> <xs:documentation>This value cannot be larger than that within the sibling 'max'.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:integer"> <xs:maxInclusive value="max"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="max"> <xs:annotation> <xs:documentation>This value cannot be smaller than that within the sibling 'min'.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:integer"> <xs:maxInclusive value="min"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="exclude" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType>
<xs:complexType name="integerParameterType">
<xs:sequence>
<xs:element name="name">
<xs:annotation>
<xs:documentation>The name must not contain whitespace and must begin with an alphabetic character.</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs