- From: Ross Thompson <rthompson@contivo.com>
- Date: Thu, 11 Apr 2002 07:32:15 -0700
- To: KAZUMI Saito <ksaito@jp.fujitsu.com>
- Cc: xmlschema-dev@w3.org
KAZUMI Saito writes: > >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}: The part you left out was 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]; > ... > , 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 ? So 1.1.1 only applies if you are doing restriction, which the example does not. So 1.2.1 applies. - Roß --- It is absurd to divide people into good and bad. People are either charming or tedious. -- Oscar Wilde
Received on Thursday, 11 April 2002 10:32:49 UTC