cancel
Showing results for 
Search instead for 
Did you mean: 

XSD question in PI - value-dependant validation in XSD schema?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

First of all XSD validation works only in PI 7.1

And in your requirement I suggest you go with the validation in mapping.