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: Sat, 12 Jul 2008 14:06:11 +0200,    group: microsoft.public.xml        back       


Why no error message when xs:include fails?   
Hi,

To validate XML against an XMLSchema in MSXML6 i use the Schema Cache. My 
XMLSchema ('example.xsd') contains an 'include' of another XMLSchema:

    <xsd:include schemaLocation="whatever.xsd"></xsd:include>

To add my schema to the schema cache i do this:

  XMLDOMSchemaCache := CoXMLSchemaCache60.Create();
  XMLDOMSchemaCache.add('', 'example.xsd');

When the included XMLSchema "whatever.xsd" does *not* exists, *no* exception 
is raised when i add "example.xsd". Why is this? How can i be sure the 
included schema is actually included?

thanks,
- Gerben Abbink
date: Sat, 12 Jul 2008 14:06:11 +0200   author:   Gerben Abbink

Re: Why no error message when xs:include fails?   
Gerben Abbink wrote:

> To validate XML against an XMLSchema in MSXML6 i use the Schema Cache. My 
> XMLSchema ('example.xsd') contains an 'include' of another XMLSchema:
> 
>     <xsd:include schemaLocation="whatever.xsd"></xsd:include>
> 
> To add my schema to the schema cache i do this:
> 
>   XMLDOMSchemaCache := CoXMLSchemaCache60.Create();
>   XMLDOMSchemaCache.add('', 'example.xsd');
> 
> When the included XMLSchema "whatever.xsd" does *not* exists, *no* exception 
> is raised when i add "example.xsd". Why is this? 

Have you set
   XMLDOMSchemaCache.validateOnLoad = true
before adding the schema?


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Sat, 12 Jul 2008 14:21:24 +0200   author:   Martin Honnen

Google
 
Web ureader.com


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