- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: Sun, 26 Oct 2003 20:49:13 +0000
- To: Michael Marchegay <mmarcheg@optonline.net>
- Cc: xmlschema-dev@w3.org, www-xml-schema-comments@w3.org
Michael Marchegay <mmarcheg@optonline.net> writes: > I find the text describing "pointless" particles (3.9.6 Constraints on > Particle Schema Components - Schema Component Constraint: Particle Valid > (Restriction)) a bit unclear. > > The first question I have is why does the text mixes XML Element > Information Items and Schema Components? > > For example what is "The <sequence>'s {particles}"? That's just bad drafting -- I can say that because I wrote it -- read that as "The {particles} of the Model Group component (whose {compositor} is 'sequence'" > Or what is a <all> whose {particles} is empty? If an <all> with no > <element> child is used within a <complexType>, isn't it supposed to > mean that the content type of the complex type is empty? If so is these > a particle created for that <all> that could justify the reference to > the {particles} property? That's pretty much a bug -- thanks for spotting it -- that case is pre-empted by the complex type mapping rule. I say 'pretty much' because it's still possible to construct a component 'by hand' which has the relevant characteristics. > Second question: is the sequence in the following complex type pointless? > > <complexType> > <sequence> > <element name="e"/> > </sequence> > </complexType> > > If yes, how could the following condition be verified? > > 2.2.2.1 The particle within which this <sequence> appears has {max > occurs} and {min occurs} of 1. More sloppy drafting, for sure. See my message to this group last month [1], and the thread it's a part of, for my best guess as to what this was intended to cover. > If no, does the following <complexType> express a valid complex type > definition? > > <complexType> > <complexContent> > <restriction base="anyType"> > <all> > <element name="e"/> > </all> > </restriction> > </complexContent> > </complexType> I think so -- both the sequence at the top of anyType and the all at the top of the above definition are 'pointless', so we match the element above against the wildcard in anyType and all is well. ht [1] http://lists.w3.org/Archives/Public/xmlschema-dev/2003Oct/0029.html -- 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@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 Sunday, 26 October 2003 15:53:12 UTC