Can override add constraints?

This should cover W3C XML Schema, Relax NG and DTD related problems.
fsteimke
Posts: 80
Joined: Tue Jan 01, 2013 3:19 pm

Can override add constraints?

Post by fsteimke »

Hi,

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?

Sincerely,
Frank Steimke
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Can override add constraints?

Post by radu_pisoi »

Hi,

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
http://www.oxygenxml.com
Post Reply