Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Mon, 4 Aug 2008 23:47:42 -0700,    group: microsoft.public.xml        back       


How to use XInclude with XSD?   
I have XInclude working and now I am trying to incorporate it in my xsd 
file. I extracted xinclude.xsd from 
http://www.w3.org/TR/2002/CR-xinclude-20020221/#syntax 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='http://www.w3.org/2001/XMLSchema'>
<xs:import namespace="http://www.w3.org/2003/XInclude" 
schemaLocation="xinclude.xsd"/>

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, 
'http://www.w3.org/2003/XInclude', of an <import> element information item 
must be identical to the targetNamespace attribute, 
'http://www.w3.org/2001/XInclude', 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 
'file:///c:/Documents%20and%20Settings/Administrator/My%20Documents/chameleon/xslt/chameleon.xsd'. 
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 
'file:///c:/Documents%20and%20Settings/Administrator/My%20Documents/chameleon/xslt/chameleon.xsd'.

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

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

What am I doing wrong?
Thanks!
Siegfried
date: Mon, 4 Aug 2008 23:47:42 -0700   author:   Siegfried Heintze

Re: How to use XInclude with XSD?   
Siegfried Heintze wrote:
> I have XInclude working and now I am trying to incorporate it in my xsd 
> file. I extracted xinclude.xsd from 
> http://www.w3.org/TR/2002/CR-xinclude-20020221/#syntax 

That is not the final recommendation. I have not checked whether there 
are any differences to http://www.w3.org/TR/xinclude/#syntax but usually 
it is not a good idea to work with a CR (candidate recommendation) when 
the final recommendation is available.


 > 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='http://www.w3.org/2001/XMLSchema'>
> <xs:import namespace="http://www.w3.org/2003/XInclude" 
> schemaLocation="xinclude.xsd"/>
> 
> 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, 
> 'http://www.w3.org/2003/XInclude', of an <import> element information item 
> must be identical to the targetNamespace attribute, 
> 'http://www.w3.org/2001/XInclude', of the imported document.

Well this one is obvious, the targetNamespace in 
http://www.w3.org/TR/xinclude/#syntax is http://www.w3.org/2001/XInclude 
while your schema has xs:import 
namespace="http://www.w3.org/2003/XInclude". That does not make sense.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Tue, 05 Aug 2008 13:22:10 +0200   author:   Martin Honnen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us