Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


MSXML 4.0 to 6.0 - Invalid Namespace And XMLSchemaCache

From: Leverd@-----------.---------.---
To: NULL
Date: 11/11/2008 10:20:00 AM
My problem is as follows.

I have some old code that uses MSXML. The code uses DOM and does 
schema validation. To validate schemas it uses an XMLSchemaCache to
relate .XSD schema files to namespaces. This is all done at run time, and the 
namespaces/schemas are statically defined. This code was developed for MSXML 
v4.0, and everything worked.

Now everything has been upgraded to MSXML v6.0 and there seems to be one 
problem. Everything is essentially the same with the inclusion of a few 
additional 
property settings (useInlineSchema, ResolveExternals, etc. taken from 
http://blogs.msdn.com/xmlteam/archive/2007/03/12/upgrading-to-msxml-6-0.aspx).

The problem occurs when you try and load an XML file with an incorrect
namespace. For example, here is an XML snippet. It sets up a namespace (sub) 
in the document. Now this namespace is tied to sub.xsd (schema) via the 
XMLSchemaCache. In this form all works well. Any element with a namespace of 
sub is validated with the sub.xsd schema.


<NameSpace:SubProjectxmlns:sub="http://www.me.com/schemas/sub"> 
<sub:prop1 /> 

If you change the namespace to something invalid however, I run into a 
problem.



<NameSpace:SubProject xmlns:sub="http://www.me.com/schemas/sub/junk"> 
<sub:prop1 /> 

In MSXML 4.0 an XML document with the above code will not load, and I get 
the proper error. In MSXML 6.0 the document loads, but everything under 
namespace
sub is not validated with any schema (as it shouldn't be because it is not 
linked to a 
schema via the namespace cache).

Do I need to flick a bit somewhere to get this same behavior in 6.0? 

Thanks for the help!


Post is abusive



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