- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Thu, 17 Jun 2004 08:38:01 +0100
- To: Tait E Larson <telarson@us.ibm.com>
- Cc: Achille Fokoue <achille@us.ibm.com>, xmlschema-dev@w3.org
Tait E Larson <telarson@us.ibm.com> writes: > In the revised spec, rule 2.1.4 at 3.4.2 XML Representation > of Complex Type Definitions [2] it seems that > > <contentType name="foo" mixed="true"></contentType> > > is equivalent to > > <contentType name="foo" mixed="true"> > <sequence/> > </contentType> > > I am not sure what significance this has except that the effective content > is not empty and therefore 3.1.2 applies in this case instead of 3.1.1. > > So, does <contentType name="foo" mixed="true"></contentType> have empty > content? I assume that this complex type actually has text for content. Correct -- untyped text, no elements. > [A]re the following complex type definitions "restr1" and "restr2" > equivalent? > > <!-- the intend of this type is to simply remove all the children > --> > <xs:complexType name='restr1' mixed='true'> > <xs:complexContent> > <xs:restriction base='base'> > <xs:attribute name='a1' /> > </xs:restriction> > </xs:complexContent> > </xs:complexType> > > <xs:complexType name="restr2"> > <xs:simpleContent> > <xs:restriction base="base"> > <xs:simpleType> > <restriction base="xs:string"/> > </xs:simpleType> > <xs:attribute name="a1" /> > </xs:restriction> > </xs:simpleContent> > </xs:complexType> > > <xs:complexType name='base' mixed='true'> > <xs:choice minOccurs='0' maxOccurs='unbounded'> > <xs:element name='e1' type='xs:string'/> > </xs:choice> > <xs:attribute name='a1'/> > </xs:complexType> Equivalent in what they will validate, not equivalent in the PSVI. Furthermore, restr2 could have used any simple type definition internally, and then there would also be validation consequences. > If they are equivalent, why was an erratum needed to address this issue? Because it was confusing people, and not internally consistent, that rstricting away all the elements in mixed content didn't leave the text still allowed. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@inf.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 Thursday, 17 June 2004 03:38:44 UTC