Altova Mailing List Archives

How to use XInclude with XSD?

From: "Siegfried Heintze" <siegfried@-------.--->
Date: 8/4/2008 11:48:00 PM

I have XInclude working and now I am trying to incorporate it in my xsd 
file. I extracted xinclude.xsd from so I would not be 
hitting someone's web site everytime I validated my xml.

Here is the beginning of my xsd file:

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs=''>
<xs:import namespace="" 

Here are the errors I am getting from xerces. I'm using xerces just because 
they have a command line tool I can download. Is there a better Microsoft 
command line tool?

[Error] xinclude.xsd:3:62: src-import.3.1: The namespace attribute, 
'', of an <import> element information item 
must be identical to the targetNamespace attribute, 
'', of the imported document.

[Error] chameleon.xsd:66:75: src-resolve.4.2: Error resolving component 
'include'. It was detected that 'include' is in namespace 'xi', but 
components from this namespace are not referenceable from schema document 
If this is the incorrect namespace, perhaps the prefix of 'include' needs to 
be changed. If this is the correct namespace, then an appropriate 'import' 
tag should be added to 

[Error] chameleon.xml:30:38: cvc-complex-type.2.4.a: Invalid content was 
found starting with element 'xi:include'. One of '{geometry-data}' is 

chameleon.xml: 328 ms (27 elems, 58 attrs, 0 spaces, 198 chars)

What am I doing wrong?


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 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.