- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 12 Feb 2001 11:16:07 +0000
- To: Helena Cavanagh <helena.cavanagh@usa.net>
- Cc: www-xml-schema-comments@w3.org
Helena Cavanagh <helena.cavanagh@usa.net> writes: > Dear editors, > > In Part 1, clause 4.3.3, tableau "Complex Type Definition with Complex Content > Schema Component", the definition of {content type} for the EXTENSION case > assumes that the {base type definition} has either a {content type} that is > empty (2.2) or that it has a particle (therefore is a pair of (content model, > mixed|element-only)) (2.3). > > This is also implicit in "Constraint on Schemas: Derivation Valid > (Extension)", Clause 5.11, when it says: > "1.1.4 (...) and either the {content type} of the {base type definition} must > be empty or > (...) 1.1.4.2 the particle of the complex type definition must be a valid > extension of the {base type definition}'s particle, as defined in Particle > Valid (Extension) (§5.10). " > > > > Can't the {content type} of the {base type definition} be a simple type > definition? Isn't the following possible? (it is validated by XML Spy, though > that is no guarantee) Yes, but that's covered by the "Complex Type Definition with _Simple_ Content" case further up. > <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"> > > <xsd:complexType name="aType"> > <xsd:simpleContent> > <xsd:extension base="xsd:string"/> > </xsd:simpleContent> > </xsd:complexType> > <!-- {content type} is a simple-type definition (that of xsd:string) --> > > > <xsd:complexType name="anotherType"> > <xsd:complexContent> > <xsd:extension base="aType"> > <xsd:all> > <xsd:element name="subelem"/> > </xsd:all> > </xsd:extension> > </xsd:complexContent> > </xsd:complexType> > > </xsd:schema> This is broken -- what would it mean, a string followed by a <subelem>? The only form of complex content which allows text is fully 'mixed' content. > it is validated by XML Spy, thoughthat is no guarantee XSV doesn't validate it, it just crashes :-( ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2001, 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/
Received on Monday, 12 February 2001 06:16:13 UTC