- From: Brett Randall <brett_s_r@hotmail.com>
- Date: Sat, 27 Sep 2003 04:07:12 +0000
- To: xmlschema-dev@w3.org
Hi all, I am wondering if the following is possible in XML Schema, and if so, how it can be done. I have an element that is a complexType with two integer attributes "from" and "to" : <xs:element name="myelement" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <-- snip --> </xs:sequence> <xs:attribute name="from" use="required"> <xs:simpleType> <xs:restriction base="xs:integer"/> </xs:simpleType> </xs:attribute> <xs:attribute name="to" use="required"> <xs:simpleType> <xs:restriction base="xs:integer"/> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> What I would like to do firstly is to prevent attribute values "from" and "to" from being equal in documents based on this schema, forcing them to be unequal. A unique or key won't do as I want to force uniqueness over two attributes. Out of interest, if I can force them to be unequal, can I also force from<to? I'm guessing I need some sort of attributeGroup? Any help/guidance appreciated. Regards, Brett _________________________________________________________________ ninemsn Premium transforms your e-mail with colours, photos and animated text. Click here http://ninemsn.com.au/premium/landing.asp
Received on Saturday, 27 September 2003 00:08:45 UTC