|
[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] using substitutionGroup members in complexType derviation by restriction ?
From: Edmund Vorauer <edmund.vorauer@utanet.at>
Date: Tue, 16 Nov 2004 14:48:30 +0100 (CET) Message-ID: <57892.194.96.222.5.1100612910.bloek@pwebmail.utanet.at> To: <xmlschema-dev@w3.org> hi! is there an non-ambiguous rule in the spec which allows the use of substitutionGroup members instead of the original element in the derived type ? i've the following schema: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="A" type="xs:token"/> <xs:element name="B" substitutionGroup="A"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:maxLength value="2"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:complexType name="X"> <xs:sequence> <xs:element ref="A"/> </xs:sequence> </xs:complexType> <xs:complexType name="Y"> <xs:complexContent> <xs:restriction base="X"> <xs:sequence> <!-- use of an substitutionGroup member from element A in the restriction --> <xs:element ref="B"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> as i understand the spec, this schema is not valid because the derived type uses element B instead of element A in the content model; the rule/clause that should be violated is rcase-NameAndTypeOK.1: 1 The declarations' {name}s and {target namespace}s are the same. however, other people argue that rule/clause cos-particle-restrict.1: 1 They are the same particle. is fulfilled because A contains B as a substitutionGroup member: any hint most wellcome! -- edmund vorauerReceived on Tuesday, 16 November 2004 14:33:38 GMT |
Subscribe in XML format
|






