> In a substitution group, the type of an element must be the same type
> as the head element or it must be derived from the type of the head.
> Xerces rejects the case where the type is not directly derived from the
type of
> of the head, i.e. :
>
> head element's type is T0
> element's type in the substitution group is T2
> T2 is derived from T1 which is derived from T0

I tried a very simple case:

 <xsd:element name="child" type="xsd:string"/>
 <xsd:element name="schild" type="string2" substitutionGroup="child"/>
 <xsd:simpleType name="string1">
   <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>
 <xsd:simpleType name="string2">
   <xsd:restriction base="string1"/>
 </xsd:simpleType>

And in my instance document, I didn't get any error if I substitute "child"
with "schild".

So I guess you are having a more complicated case than you described
(complexType? block? final? ...). It would definitely help if you could
post a simple schema that reproduces your problem.

Thanks,
Sandy Gao
Software Developer, IBM Canada
(1-416) 448-3255
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to