Can override add constraints?

This should cover W3C XML Schema, Relax NG and DTD related problems.
Posts: 44

Can override add constraints?

Fri Aug 19, 2016 8:22 am


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
Posts: 334
Location: Craiova

Re: Can override add constraints?

Fri Aug 19, 2016 11:02 am


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?
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests