conplexType with mixed="true" and no content.

From my read of the schema recomenndation, following xml instance
is not valid against that schema.

XSD:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="root">
    <xs:complexType mixed="true"/>
  </xs:element>
</xs:schema>

XML:
<root>text</root>

Because, the rec says in "Complex Type Definition with complex content
Schema Component", 

{content type}:
1.1 If one of the following is true
1.1.1 There is no <group>, <all>, <choice> or <sequence> among the [children]; 
  ...
, then empty; (*1)
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]. 

clause  1.2.1 above makes menthion of mixed attribute, but clause 1.1.1
is match first, then the <root> element must be empty, I think.

clause 1.2.1.x is prior to clause 1.1 ?

-----
 KAZUMI Saito  FUJITSU Ltd.

Received on Thursday, 11 April 2002 07:08:18 UTC