[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    Re: Schema validation & location question with DOM Parser.
From:       David Sheldon <dws () decisionsoft ! com>
Date:       2003-02-27 9:12:47
[Download RAW message or body]

On Wed, Feb 26, 2003 at 02:26:48PM -0500, Axelle Apvrille (LMC) wrote:
> Axelle Apvrille (LMC) wrote:
> >Creating a sample XML document to parse
> ><?xml version='1.0' encoding='ascii'?>
> ><dsi:UpdatePolicy xmlns='http://www.w3.org/2001/XMLSchema'
> >                 xmlns:dsi='http://xxx'
> >                 dsi:schemaLocation='http://xxx UpdatePolicy.xsd'>
> > <PolicyFile> /etc/toto.txt </PolicyFile>
> ></dsi:UpdatePolicy> 
> 
> Noticed an error: I believe it should be schemaLocation= and not 
> dsi:schemaLocation=
> However that does not change anything to the errors I get.

The schemaLocation attribute is supposed to be in the
"http://www.w3.org/2001/XMLSchema-instance" namespace, and as this is a
document, do you really want to make the default namespace
"http://www.w3.org/2001/XMLSchema", thus putting your PolicyFile element
into that namespace?

I think what you want is something like:

<UpdatePolicy xmlns='http://xxx'
          xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
 xsi:schemaLocation='http://xxx UpdatePolicy.xsd'>
 
  <PolicyFile> /etc/toto.txt </PolicyFile>
</UpdatePolicy>

I hope this helps.

David
-- 
David Sheldon, Client Services        DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic