Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: MSXML 4.0 to 6.0 - Invalid Namespace And XMLSchemaCache

From: Leverd@-----------.---------.---
To: NULL
Date: 11/12/2008 12:25:00 PM
Alright, I have some results. First and foremost, thank you very much for 
your help.
I don't think I could have gotten to this point without it.

I created schema and XML files that matched yours, and I got the same exact 
results (I'm using C++). So the problem is with my schemas, not MSXML.

I created a second test case that matches my current schemas. Below are
the edits I made to your examples.

Here is the schema file test2008111201Xsd.xml:

<xs:schema
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   elementFormDefault="qualified">

   <!--xmlns:pf2="http://example.com/2008/ns2"-->
   <!--targetNamespace="http://example.com/2008/ns1"-->
   <!--<xs:import namespace="http://example.com/2008/ns2" 
schemaLocation="test2008111202Xsd.xml"/>-->

   <xs:element name="root">
     <xs:complexType>
       <xs:sequence>
         <xs:element name="foo">
           <!--
            <xs:complexType>
             <xs:sequence>
               <xs:element ref="pf2:bar"/>
             </xs:sequence>
           </xs:complexType>
            -->
         </xs:element>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
</xs:schema>

Here is the schema file test2008111202Xsd.xml:

<xs:schema
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   elementFormDefault="qualified">

    <!--  targetNamespace="http://example.com/2008/ns2" -->

   <xs:element name="foo">
    <xs:complexType>
        <xs:sequence>
            <xs:element ref="bar"/>
        </xs:sequence>
    </xs:complexType>
    </xs:element>

   <xs:element name="bar" type="xs:int"/>
</xs:schema>


Here is an XML instance document named test2008111201.xml (same as before).

<pf1:root xmlns:pf1="http://example.com/2008/ns1">
   <pf1:foo xmlns:pf2="http://example.com/2008/ns3">
     <pf2:bar>foobar</pf2:bar>
   </pf1:foo>
</pf1:root>


If I run the above I will get no error from MSXML6.0, but will get an error 
for 
MSXML 4.0. If I change 'n3' to 'n2', it tries to validate in both 6.0 and 
4.0 (gives me an error because 'foobar' is not an int type).

So this might be some internal quirk that changed from 4.0 to 6.0, but the 
real problem is likely with my schemas. Is this a valid way to write a schema?

Thanks again!








transparent
Print
Mail
Digg
delicious
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