Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


xs:any processContents="skip" and xsi:type

From: tomthemighty@----------.---
To: 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent