You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by st...@vodafone.co.uk on 2001/09/10 16:23:25 UTC
SubstitutionGroup & final attribute query
Hi
I'm using a substitutionGroup with a head element of type xsd:anyType
together with two substitutable elements, one a simpletype
[simpleSubstitute] and the other a complexType [complexSubstitute] (see
attached XML Schema & instance files).
Xerces-J 1_4_3 using the Schema as attached gives the following validation
error 'Schema error: element simpleSubstitute cannot be part of the
substitution group headed by anyHead.'.
However if I remove the finalDefault="restriction" from the xsd:schema
element, xerces-J is able to validate Substitution.xml ok.
Am I correct in believing that it is ok to substitute either a simpleType or
a complexType for a head element of type xsd:anyType regardless of the value
of the final attribute and that the error stated above is caused by
incorrect handling of the finalDefault attribute or am I missing something
about how substitutionGroups function in the presence of
final="restriction".
Regards
Stu
--
Stuart Welham - Software Engineer, Vodafone Multimedia
--