Re: redundant mixed="true" required?

Masayasu Ishikawa <mimasa@w3.org> writes:

> Suppose that I have a schema like this:

<snip/>

>   <xs:complexType name="mixed" mixed="true">
>     <xs:choice minOccurs="0" maxOccurs="unbounded">
>       <xs:element ref="test:a"/>
>       <xs:element ref="test:b"/>
>     </xs:choice>
>   </xs:complexType>
> 
>   <xs:element name="root">
>     <xs:complexType>
>       <xs:complexContent>
>         <xs:extension base="test:mixed">
>           <xs:attribute name="id" type="xs:ID"/>
>         </xs:extension>
>       </xs:complexContent>
>     </xs:complexType>
>   </xs:element>

<snip/>

> And an instance would be something like this:
> 
> <root xmlns="http://example.com/test">
>   ccc<a>aaa<b>bbb</b>aaa</a>ccc<b>bbb<a>aaa</a>bbb</b>ccc
> </root>
> 
> MSV (20020414), Xerces-J 2.0.2 and XML Spy 4.4 reported no problem,
> but XSV (online version, 1.203.2.47.2.4.2.11/1.106.2.25.2.3) complained
> like this:
> 
>     Invalid per cvc-complex-type.1.2.3: text not allowed: | ccc|

> What's/who's wrong?

XSV bug, sorry.  Will take a little while to fix, I'm in the midst of
preparing a new release which is involving a bunch of reorganisation.

Note however that this 'redundancy' can only be avoided when the
extending definition is empty -- if any substantive element content is
added, then the result is specified by the REC to take its 'mixed'
from the extending definition.  But the REC also rules out extending
mixed with element-only or vice-versa, so there's no point.

This isn't a big deal, but it should probably be fixed, by
 a) specifiying that in complexContent extension, the mixed _always_
    comes from the base;
 b) ruling out conflicting 'mixed' on <complexType> or
    <complexContent> when deriving by extension.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

Received on Monday, 26 August 2002 04:11:01 UTC