FIX: Unexpected Validation Error on xsd:any processContents="skip" (317353)
The information in this article applies to:
- Microsoft XML Classes (included with the .NET Framework 1.0)
This article was previously published under Q317353 SYMPTOMS If you define a complex type with a xsd:any declaration and an attribute of processContents="skip"; for example
<xsd:schema id="test1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:any namespace="##any" processContents="skip" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
When you use an XmlValidatingReader(System.Xml namespace) call to validate the following XML data against the above schema
<root><this that="somevalue"/></root>
the following error is returned:
Severity:Warning Message : Could not find schema information for the element
'this'. An error occurred at (x, y). Severity:Error Message : The 'that'
attribute is not declared . An error occurred at (x, y).
STATUS This bug was corrected in Microsoft .NET Framework Class
Libraries.
However, a similar problem where you may have xsi or xsd attributes continues to occur. This problem is also a bug and is not fixed in the .NET Framework Class Libraries 1.1.
Modification Type: | Major | Last Reviewed: | 9/18/2003 |
---|
Keywords: | kbBug kbnofix KB317353 |
---|
|