This is more of an generic XML Schema question, but if and how do you specify field dependencies in an XML Schema. For example, how would I say fieldB is required, if fieldA is provided ???
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could fake this using <choice> and/or <sequence>. For example, you could allow either nothing, fieldB, or fieldA and fieldB, but not just fieldA. This could lead to duplication, which you could prevent by defining a complexType.