W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: Derivation by restriction Q?

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Thu, 11 Oct 2001 16:48:56 +0200
Message-ID: <3BC5B158.7040008@dyomedea.com>
To: Jakub.Valenta@Deio.net
Cc: xmlschema-dev@w3.org

Jakub.Valenta@Deio.net wrote:

> If the original type is complex and mixed.
> The derived type has its complex content derived from the original type,
> but does not define itself as being mixed.
> Is the derived type also mixed or not.

 From *my* reading of the rec, the result of the derivation will be 
mixed only if defined as mixed in its own complexContent or complexType 


1.2 otherwise a pair consisting of
1.2.1 the appropriate case among the following: If the mixed [attribute] is present on <complexContent>, then 
mixed if its ·actual value· is true, otherwise elementOnly; If the mixed [attribute] is present on <complexType> and its 
·actual value· is true, then mixed; otherwise elementOnly.
1.2.2 The particle corresponding to the <all>, <choice>, <group> or 
<sequence> among the [children].

(more comments below)

> I don't know if the mixed property behave as the attributes which are
> ihnerited automatically if not stated otherwise,
> or if the mixed propery behaves as sub elements which are not inherited
> automatically if not stated otherwise.!?!
> I would appreciate any help.
> br,
> Jakub Valenta
> the following is the part of the XML schema I am dealing wiht, since the ED
> is mixed and its child element TN is defined as restriction of the ED is it
> also mixed?
> <xsd:complexType name='ED' mixed='true'>
>     <xsd:annotation>
>       <xsd:appinfo>
>         <hl7:datatype>ED</hl7:datatype>
>         <hl7:pr>(@NULL or REF) and not(@NULL and REF)</hl7:pr>
>         <hl7:pr>@NULL or @MT</hl7:pr>
>       </xsd:appinfo>
>     </xsd:annotation>
>     <xsd:complexContent>
>       <xsd:extension base='v3dt:base'>
>         <xsd:sequence>
>           <xsd:element name='REF' type='v3dt:TEL' minOccurs='0' maxOccurs
> ='1'>
>             <xsd:annotation>
>               <xsd:appinfo>
>                 <hl7:property>reference</hl7:property>
>               </xsd:appinfo>
>             </xsd:annotation>
>           </xsd:element>
>           <xsd:element name='TN' minOccurs='0' maxOccurs='1'>
>             <xsd:annotation>
>               <xsd:appinfo>
>                 <hl7:property>thumbnaili</hl7:property>
>               </xsd:appinfo>
>             </xsd:annotation>

If you want it to be mixed, you should indicate it here:

>             <xsd:complexType>


>               <xsd:complexContent>
or                                 ^

Hope this helps.


>                 <xsd:restriction base='v3dt:ED'>
>                   <xsd:sequence>
>                     <xsd:element name='REF' type='v3dt:TEL' minOccurs='0'
> maxOccurs='1'/>
>                     <xsd:element name='TN' type='v3dt:ED' minOccurs='0'
> maxOccurs='0'/>
>                   </xsd:sequence>
>                 </xsd:restriction>
>               </xsd:complexContent>
>             </xsd:complexType>
>           </xsd:element>

Rendez-vous ą Paris pour une visite guidee de la nebuleuse XML.
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
Received on Thursday, 11 October 2001 10:48:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:53 UTC