on 05-07-2009 7:43 AM
Hi
is it possible to have a value-dependant "validation" in XSD schema?
My issue:
have xml structure like
<FieldA>
<Fieldaa>
<Fieldab>
The <Fieldaa> and <Fieldab> should ONLY be MANDATORY if the VALUE of <FieldA> = '1'.
Is that possible to describe in an XSD?
Ofcourse I can make the validation in my mapping but really want to figure out if it was possible in the XSD schema?
Hope you can help
Hi, I think the answer is "no" :o(
http://en.wikipedia.org/wiki/XSD
XSD provides no facilities to state that the value or presence of one attribute is dependent on the values or presence of other attributes (so-called co-occurrence constraints)
http://www.open-std.org/jtc1/sc34old/repository/0392.htm
XSD does not allow you to make the set of valid values for one element or attribute dependent on the content of another element or attribute. For example, if the content of one element is �Male� then the list of valid diseases accepted in another element should be one that does not include those related to gynaecology.
Kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First of all XSD validation works only in PI 7.1
And in your requirement I suggest you go with the validation in mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.