Page 1 of 1

Can override add constraints?

Posted: Fri Aug 19, 2016 8:22 am
by fsteimke

i would like to add some new Elements on a document instance. Before the Transformation, the instance is valid to Schema A where the new Elements are not known. Afterwards it is valid to a Schema B which is similar to A, but the new Elements are known and required. To do so, i have designed Schema B as overriding Schema A. Both Schemata A an B are XSD Version 1.1.

Everything is fine unless i try to add new constraints by overriding the root element. Schema A defines some constraints like xs:key, xs:keyRef and xs:unique on the root element. I would like to add additional constraints like xs:key for the new Elements. But in the moment i try to override the root element, oxyen (saxon) complains about its duplicate contraints.

Is there a way to add constraints by overriding an element which already has constraints?

Frank Steimke

Re: Can override add constraints?

Posted: Fri Aug 19, 2016 11:02 am
by radu_pisoi

I don't know any limitation about adding additional constrains when overriding an element.

Could you share with us a sample schema that has this problem?