Hi, In xml i have an element which occurs at two different places(in two different complex types) In schema,is it possible to restrict this single element to have same value on its occurences. Like <A> <B>1234</B> <C>dkjds</C> </A> <X> <B>1234</B> </X> This element B should have same value on all its occurences. Is it possible to specify this in schema.
Just give it a facet enumeration value <xs:element name="B"> <xs:simpleType> <xs:restriction base="xs:short"> <xs:enumeration value="1234"/> </xs:restriction> </xs:simpleType> </xs:element>
Hi Jerry, Unfortunately I cant force my user to use a fixed value like 1234. I removed that constraints from my reqts Thanks for your reply. Regards Balaji