Hi,
i have never had the need to write an XML Schema until now. and for the purposes of my web service i have got one alomst complete and the code to validate it. But, i have one problem which i am not sure how to solve.
A submitted XML doc (or string) to my web service must have at least one customer contact number, and i am not sure how to validate this.
At the moment my schema has the 3 possible contact numbers as separate elements. e.g.
<xs:element name="HomeNumber" type="xs:string"/>
<xs:element name="WorkNumber" type="xs:string"/>
<xs:element name="MobileNumber" type="xs:string"/>
but i am not sure how to say in the schema: 'one of this set of elements must contain data'.
If someone could help me out with how to best achieve this, i would be most appreciative.
Cheers
ik
i have never had the need to write an XML Schema until now. and for the purposes of my web service i have got one alomst complete and the code to validate it. But, i have one problem which i am not sure how to solve.
A submitted XML doc (or string) to my web service must have at least one customer contact number, and i am not sure how to validate this.
At the moment my schema has the 3 possible contact numbers as separate elements. e.g.
<xs:element name="HomeNumber" type="xs:string"/>
<xs:element name="WorkNumber" type="xs:string"/>
<xs:element name="MobileNumber" type="xs:string"/>
but i am not sure how to say in the schema: 'one of this set of elements must contain data'.
If someone could help me out with how to best achieve this, i would be most appreciative.
Cheers
ik