- From: Martin Thomson <martin.thomson@nortel.com>
- Date: 21 Apr 2005 20:27:17 -0600
- To: ht@inf.ed.ac.uk
- Cc: www-xml-schema-comments@w3.org
- Message-ID: <C0FA66CBDDF5D411B82E00508BE3A72210133593@zctwc059.asiapac.nortel.com>
> Substitution group heads are treated as if they were choices, so the change you've made above sets the explicit (X1|X2) against the implicit (X1|X2|X3), which is fine. Or am I missing something? That being the case, maybe there is a bug with the parser that I am using (Xerces 2.6.2). But I'm not convinced; the standard does not explicitly specify this case under cos-particle-restrict (Schema Component Constraint: Particle Valid (Restriction)), so I guess I can fault the implementation too much. In addition, the rules under cos-particle-restrict (2.2, then 2.2.2 and 2.2.2.2) mean that the inner choice is simplified away. Leaving the restriction one of elt <- choice, which is expressly prohibited. M -----Original Message----- From: ht@inf.ed.ac.uk [mailto:ht@inf.ed.ac.uk] Sent: Wednesday, 13 April 2005 6:54 PM To: Thomson, Martin [WOLL:5500:EXCH] Cc: www-xml-schema-comments@w3.org Subject: Re: Restriction+choice+substitutionGroup: rcase-RecurseLax insufficie nt? "Martin Thomson" <martin.thomson@nortel.com> writes: > <xsd:complexType name="A"> > <xsd:complexContent> > <xsd:restriction base="xsd:anyType"> > <xsd:choice minOccurs="0" maxOccurs="unbounded"> > <xsd:element ref="X"/> > <xsd:element ref="Y"/> > </xsd:choice> > </xsd:restriction> > </xsd:complexContent> > </xsd:complexType> <snip/> > <!-- INVALID SCHEMA --> > <xsd:complexType name="B"> > <xsd:complexContent> > <xsd:restriction base="A"> > <xsd:choice minOccurs="0" maxOccurs="unbounded"> > <xsd:element ref="X1"/> > <xsd:element ref="X2"/> > <xsd:element ref="Y"/> > </xsd:choice> > </xsd:restriction> > </xsd:complexContent> > </xsd:complexType> Yes, it's irritating that that won't work -- will be fixed in 1.1 we hope. > <!-- INVALID SCHEMA --> > <xsd:complexType name="B"> > <xsd:complexContent> > <xsd:restriction base="A"> > <xsd:choice minOccurs="0" maxOccurs="unbounded"> > <xsd:choice> > <xsd:element ref="X1"/> > <xsd:element ref="X2"/> > </xsd:choice> > <xsd:element ref="Y"/> > </xsd:choice> > </xsd:restriction> > </xsd:complexContent> > </xsd:complexType> What's wrong with that one? Substitution group heads are treated as if they were choices, so the change you've made above sets the explicit (X1|X2) against the implicit (X1|X2|X3), which is fine. Or am I missing something? 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 Friday, 22 April 2005 02:28:50 UTC