- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 09 Nov 2000 10:25:41 +0000
- To: "Bob Schloss/Watson/IBM" <rschloss@us.ibm.com>
- Cc: www-xml-schema-comments@w3.org
"Bob Schloss/Watson/IBM" <rschloss@us.ibm.com> writes:
> My reading of Structures "Constraints on Complex Types",
> Section 5.11 http://www.w3.org/TR/2000/CR-xmlschema-1-20001024/#coss-ct
> Derivation Valid (Extension)
> clause 1.1.4 and particularly clause 1.1.4.1 makes me think that
> the Primer Example in "Abstract Elements and Types" section 4.7
> http://www.w3.org/TR/2000/CR-xmlschema-0-20001024/#abstract
> has a definition for complexType "car" which is not allowed.
>
> Is this a problem of me being unable to see the parsing of all the
> "ands" and "ors" which are in clause 1.1.4 of
> Derivation Valid (Extension) paragraphs of Section 5.11 of Structures?
>
> Primer example:
>
> <complexType name="Vehicle" abstract="true"/>
>
> <complexType name="Car">
> <complexContent>
> <extension base="target:Vehicle"/>
> </complexContent>
> </complexType>
>
>
> Structures: clause 1.1.4 of Derivation Valid (Extension) paragraphs in
> section 5.11:
>
> Either the {content type} of the {base type definition} and the {content
> type} of the complex
> type definition itself must be the same simple type definition, or else
> the {content type} of
> the complex type definition itself must specify a particle and either
> the {content type} of the
> {base type definition} must be empty or
> 1.1.4.1 both {content type}s must be mixed or both must be
> element-only;
I _think_ this is all OK. Bear in mind this is a constraint on schema
components, not XML representations. So saying 'must specify a
particle' is really the same as saying 'must have complex content' (as
opposed to simple content). The example above satisfies all this,
because per the correspondence rules for extension [1],
"2.1 if the explicit content is empty, then the {content type} of
the type definition resolved to by the normalized value of the base
[attribute]"
you'll end up with a vacuous extension, which has a content
type==particle, which will itself be a valid extension, because no
change at all is a valid extension.
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 Thursday, 9 November 2000 05:25:46 UTC