substitutionGroup and final

Hi all,

This is schema snippet valid?
 <xsd:element name="comment" type="xsd:string" final="restriction"/>
 <xsd:element name="mycomment" type="xsd:string" substitutionGroup="comment"/>

In another word, does final="restriction" allow the element substitution group with the same type?

In my understanding of the spec, this is invalid, because xsd:string is a valid "restriction" of xsd:string, which is prevented by final="restriction" attribute. XSV test thinks this is valid, and the book "Definitive XML Schema" seems says it is valid too.

Thanks,

-Neal

Received on Wednesday, 5 January 2005 01:48:38 UTC