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

RE: [XML Schema 1.1] Does mode="none" on a subtype nullify the openness of its parent type?

From: Costello, Roger L. <costello@mitre.org>
Date: Fri, 5 Jun 2009 13:36:44 -0400
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5003FD40C1AC@IMCMBX3.MITRE.ORG>
 
> if the base type allows open content, then a 
> type derived from it by extension must also 
> allow open content.

Now I'm really confused.

What value is mode="none"?

I thought that the point of mode="none" was to enable a subtype to "turn off" the openness of its parent type? If this is not the case, then what value is mode="none"?

/Roger

> -----Original Message-----
> From: Michael Kay [mailto:mike@saxonica.com] 
> Sent: Friday, June 05, 2009 1:32 PM
> To: Costello, Roger L.; xmlschema-dev@w3.org
> Subject: RE: [XML Schema 1.1] Does mode="none" on a subtype 
> nullify the openness of its parent type?
> 
> > Consider this base type (with mode="interleave") and subtype 
> > (with mode="none"):
> > 
> >     <complexType name="Publication" abstract="true">
> >         <openContent mode="interleave">
> >             <any />
> >         </openContent>
> >         <sequence>
> >             <element name="Title" type="string" />
> >             <element name="Author" type="string" />
> >             <element name="Date" type="gYear"/>
> >         </sequence>
> >     </complexType>
> > 
> >     <complexType name="BookPublication">
> >         <complexContent>
> >             <extension base="pub:Publication">
> >                 <openContent mode="none">
> >                     <any />
> >                 </openContent>
> >                 <sequence>
> >                     <element name="ISBN" type="string"/>
> >                     <element name="Publisher" type="string"/>
> >                 </sequence>
> >             </extension>
> >         </complexContent>
> >     </complexType>
> > 
> 
> Sorry, I misled you. This schema is not valid: it violates 
> Schema Component
> Constraint: Derivation Valid (Extension), clause 1.4.3.2.2.3, 
> which states
> in effect that if the base type allows open content, then a 
> type derived
> from it by extension must also allow open content.
> 
> Regards,
> 
> Michael Kay
> http://www.saxonica.com/
> http://twitter.com/michaelhkay  
> 
> 
Received on Friday, 5 June 2009 17:37:16 GMT

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