W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2009

RE: Restricting attribute use from optional to required

From: Michael Kay <mike@saxonica.com>
Date: Mon, 17 Aug 2009 14:28:28 +0100
To: 'Jan Přidal' <jan.pridal@gmail.com>, <xmlschema-dev@w3.org>
Message-ID: <436B640CB72649BE9D456F4361CBCA84@Sealion>
> But it is then more than a little bit awkward - as I have to 
> add a new complexType that restricts the complexType 'parent' 
> and then within it I have to repeat all the stuff declared 
> the 'parent' and its parent types (by extension) etc.

Yes, that's a particularly nasty feature of derivation by restriction.

If you're only restricting the attributes, and not the content model, you
can get around it by having both the base type and the derived type
reference the same named model group.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
Received on Monday, 17 August 2009 13:29:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:14 GMT