Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: xs:any processContents="skip" and xsi:type xs:any processContents="skip" and xsi:typeTo: NULL Date: 6/4/2009 4:40:00 AM If I have a schema like this:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="foo">
<xs:complexType>
<xs:sequence>
<xs:any processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
and use it to validate a document (using MSXML) like this:
<foo>
<bar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="wibble"/>
</foo>
I get the following error:
Supplied input XML is invalid
Reason: Type 'wibble' is not found in Schema.
Line number: 2
Char position: 27
Source XML: <bar xsi:type="wibble"/>
^
I think this is incorrect on MSXML's part. The
processingContents="skip" should skip validation, but it is reporting
a validation error because of the xsi:type attribute. Saxon had a
similar problem which was considered a bug:
http://markmail.org/message/qqovu5o73566m5xq#query:xs%3Aany%20xsi%3Atype+page:1+mid:tciyyib5zkcfbanw+state:results
Does anybody know of a workaround for this? I need an element that can
contain genuinely arbitrary well-formed XML - "any well formed XML as
long as it doesn't contain any xsi:type attributes" isn't good enough.
Many thanks,
Tom
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
