a problem with derivation by restriction

I try to validate my XML against XSD Schema (MyScheme.xsd - see below) using the XmlValidatingReader in my C# project.
Here is the error messge I've received:
    "XMLValidatingReader class cannot allow changing of attributes restriction."

but XMLSPY 5 has validate the same file successfully.
I've found that if the attribute (MinValue or MaxValue) is changed from "optional" to "prohibited", the XMLValidatingReader does'n generate an error.

Is that scheme correct or no?
Could you suggest me any XML validating parser?

Thanks,
Stoyka
------
MyScheme.xsd
<xs:schema>
 <xs:complexType name="MyType">
  <xs:attribute name="Description" type="xs:string" use="required" />
  <xs:attribute name="Value" type="xs:string" use="required" />
  <xs:attribute name="MinValue" type="xs:decimal" use="optional" />
  <xs:attribute name="MaxValue" type="xs:decimal" use="optional" />
 </xs:complexType>
 <xs:element name="MyElement">
  <xs:complexType>
   <xs:complexContent>
    <xs:restriction base="MyType">
     <xs:attribute name="Description" type="xs:string" use="required" />
     <xs:attribute name="Value" type="xs:string" use="required" />
     <xs:attribute name="MinValue" use="required" />
     <xs:attribute name="MaxValue" use="prohibited" />
    </xs:restriction>
   </xs:complexContent>
  </xs:complexType>
 </xs:element>
</xs:schema>

Received on Wednesday, 12 February 2003 10:39:31 UTC