Schema xs:restriction question (values compared to siblings)

Status
Not open for further replies.

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:pattern 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>
 

Greg Faron

Usenet Archive
Joined
Feb 21, 2000
Messages
20
Reaction score
0
Nobody has any ideas on this one? Looks like I'm stuck with an XSLT-side validation solution. Ich.
 
Status
Not open for further replies.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top