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: Tue, 15 Jul 2008 16:50:56 +0200,    group: microsoft.public.xml        back       


MSXML6 ignores IXMLDOMDocument.schemas property and uses schemaLocation and noNamespaceSchemaLocation?   
Hi,

I am migrating from MSXML4 to MSXML6. In MSXML4 i use the schemas property 
of the IXMLDOMDocument interface:

    XMLDOMDocument.schemas := SchemaCache;

MSXML4 ignores the schema references in the XML document (schemaLocation and 
noNamespaceSchemaLocation) when the schemas property is not Null. But MSXML6 
seems to use schemaLocation and noNamespaceSchemaLocation instead of the 
schema references in the schema cache.

Do i have to set a property to get the old behavior?

thank you,
- Gerben Abbink
date: Tue, 15 Jul 2008 16:50:56 +0200   author:   Gerben Abbink

Re: MSXML6 ignores IXMLDOMDocument.schemas property and uses schemaLocation and noNamespaceSchemaLocation?   
Gerben Abbink wrote:
> Hi,
> 
> I am migrating from MSXML4 to MSXML6. In MSXML4 i use the schemas property 
> of the IXMLDOMDocument interface:
> 
>     XMLDOMDocument.schemas := SchemaCache;
> 
> MSXML4 ignores the schema references in the XML document (schemaLocation and 
> noNamespaceSchemaLocation) when the schemas property is not Null. But MSXML6 
> seems to use schemaLocation and noNamespaceSchemaLocation instead of the 
> schema references in the schema cache.
> 
> Do i have to set a property to get the old behavior?


According to http://msdn.microsoft.com/en-us/library/ms762261(VS.85).aspx
with

  ValidateOnParse = true

ResolveExternals = false

UseInlineSchema = false

the behaviour is as follows:

"Validates the document against a schema resolved from a schema-cache. 
An inline schema and the schemaLocation attributes are ignored. This is 
the default behavior for MSXML 6.0."

Does that not work for you?



-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Tue, 15 Jul 2008 17:47:47 +0200   author:   Martin Honnen

Re: MSXML6 ignores IXMLDOMDocument.schemas property and uses schemaLocation and noNamespaceSchemaLocation?   
Ok, in my case ResolveExternals was True.

But, "Validates the document against a schema resolved from a schema-cache 
or the schemaLocation attributes" is ambiguous. In my case attribute 
"schemaLocation" was used instead of the schema-cache which i find a bit 
strange. This way it's not possible to 'override' the schemaLocation that 
was given in the XML document.

- Gerben


"Martin Honnen"  wrote in message 
news:e6xMmIp5IHA.3684@TK2MSFTNGP05.phx.gbl...
> Gerben Abbink wrote:
>> Hi,
>>
>> I am migrating from MSXML4 to MSXML6. In MSXML4 i use the schemas 
>> property of the IXMLDOMDocument interface:
>>
>>     XMLDOMDocument.schemas := SchemaCache;
>>
>> MSXML4 ignores the schema references in the XML document (schemaLocation 
>> and noNamespaceSchemaLocation) when the schemas property is not Null. But 
>> MSXML6 seems to use schemaLocation and noNamespaceSchemaLocation instead 
>> of the schema references in the schema cache.
>>
>> Do i have to set a property to get the old behavior?
>
>
> According to http://msdn.microsoft.com/en-us/library/ms762261(VS.85).aspx
> with
>
>  ValidateOnParse = true
>
> ResolveExternals = false
>
> UseInlineSchema = false
>
> the behaviour is as follows:
>
> "Validates the document against a schema resolved from a schema-cache. An 
> inline schema and the schemaLocation attributes are ignored. This is the 
> default behavior for MSXML 6.0."
>
> Does that not work for you?
>
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
date: Wed, 16 Jul 2008 14:47:39 +0200   author:   Gerben Abbink

Google
 
Web ureader.com


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