- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Wed, 13 Apr 2005 09:54:19 +0100
- To: "Martin Thomson" <martin.thomson@nortel.com>
- Cc: www-xml-schema-comments@w3.org
"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 Wednesday, 13 April 2005 08:54:26 UTC