- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Thu, 11 Oct 2001 18:47:00 +0100
- To: Jakub.Valenta@Deio.net
- CC: xmlschema-dev@w3.org
Hi Jakub, > 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, then the derived type is only mixed if: (a) the xs:complexContent element has got a mixed attribute equal to true; or (b) the xs:complexContent element hasn't got a mixed attribute and the xs:complexType element has got a mixed attribute equal to true So whether the base type is mixed or not has no effect on whether the derived type is mixed or not. If you want the derived type to be mixed then you have to add a mixed attribute equal to true to the xs:complexType defining the type or xs:complexContent element within it. This comes from Section 3.4.2 of the XML Schema: Structures Rec, in the part on the Complex Type Definition with complex content Schema Component (http://www.w3.org/TR/xmlschema-1/#element-complexContent). In defining the {content type} it says: The appropriate case among the following: 1 If the <restriction> alternative is chosen, then the appropriate case among the following: 1.1 If one of the following is true 1.1.1 There is no <group>, <all>, <choice> or <sequence> among the [children]; 1.1.2 There is an <all> or <sequence> among the [children] with no [children] of its own excluding <annotation>; 1.1.3 There is a <choice> among the [children] with no [children] of its own excluding <annotation> whose minOccurs [attribute] has the ·actual value· 0; , then empty; 1.2 otherwise a pair consisting of 1.2.1 the appropriate case among the following: 1.2.1.1 If the mixed [attribute] is present on <complexContent>, then mixed if its ·actual value· is true, otherwise elementOnly; 1.2.1.2 If the mixed [attribute] is present on <complexType> and its ·actual value· is true, then mixed; 1.2.1.3 otherwise elementOnly. 1.2.2 The particle corresponding to the <all>, <choice>, <group> or <sequence> among the [children]. The relevant part is clause 1.2.1. I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Thursday, 11 October 2001 13:47:03 UTC