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
--

Attachment: Substitution.xml
Description: Binary data

Attachment: Substitution.xsd
Description: Binary data

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

Reply via email to