W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

conplexType with mixed="true" and no content.

From: KAZUMI Saito <ksaito@jp.fujitsu.com>
Date: Thu, 11 Apr 2002 20:09:47 +0900
Message-Id: <200204111109.AA02622@OTOHIME.jp.fujitsu.com>
To: xmlschema-dev@w3.org
From my read of the schema recomenndation, following xml instance
is not valid against that schema.

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


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: 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]. 

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 ?

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

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