- From: Temp - Nixon, Tristan <temptn@carnegielearning.com>
- Date: Tue, 12 Sep 2006 19:41:56 +0000
- To: <www-xml-schema-comments@w3.org>
- Message-Id: <9609466E-F5EA-4E22-A7CA-8BC25E355C96@carnegielearning.com>
I suggest that restrictions of types should imply changes only to those elements specified, not to all elements in the base type. For example: <xs:complexType name=”addressType”> <sequence> <xs:element name=”street” type=”xs:string”> <xs:element name=”city” type=”xs:string”> </sequence> </xs:complexType> Currently needs to be restricted like so: <xs:complexType name=”simpleAddressType”> <xs:complexContent> <xs:restriction base=”addressType”> <sequence> <xs:element name=”street” type=”xs:string”> <xs:element name=”city” type=”xs:string”> </sequence> </xs:restriction> </xs:complexContent> </xs:complexType> I would propose that this should be accomplished by the following: <xs:complexType name=”simpleAddressType”> <xs:complexContent> <xs:restriction base=”addressType”> <sequence> <xs:element name=”street” type=”xs:string”> </sequence> </xs:restriction> </xs:complexContent> </xs:complexType> Where the only elements altered from the base type definition are those mentioned within the restriction tags. In order to remove elements from a definition, this could be accomplished as follows: <xs:complexType name=”simpleAddressType”> <xs:complexContent> <xs:restriction base=”addressType”> <sequence> <xs:element name=”city” type=”xs:string” maxOccurs=”0”> </sequence> </xs:restriction> </xs:complexContent> </xs:complexType>
Received on Thursday, 21 September 2006 23:54:11 UTC