You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Paul <ol...@USA.net> on 2001/08/01 22:37:52 UTC

Validating xml file against a different schema

Hi,

Using Xerces, is there a way I can override the schema file
specified in the XML file instance when I do the schema validation?

What I mean is if I have this in my sample.xml

xsi:noNamespaceSchemaLocation="/home/paul/sample.xsd"

and I want to validate this file against another schema
say in "/home/paul/true_sample.xsd", is there a way I 
can do it without modifying sample.xml? 

THanks for the help,
-Paul

Re: Validating xml file against a different schema

Posted by Paul <ol...@USA.net>.

Thanks! I got it working now.

----- Original Message ----- 
From: "Justin Lipton" <ju...@ns.xn.com.au>
To: <xe...@xml.apache.org>
Sent: Wednesday, August 01, 2001 6:04 PM
Subject: Re: Validating xml file against a different schema


> You can write your own EntityResolver to achieve this.
> 
> Paul wrote:
> 
> > Hi,
> >
> >  
> >
> > Using Xerces, is there a way I can override the schema file
> >
> > specified in the XML file instance when I do the schema validation?
> >
> >  
> >
> > What I mean is if I have this in my sample.xml
> >
> >  
> >
> > xsi:noNamespaceSchemaLocation="/home/paul/sample.xsd"
> >
> >  
> >
> > and I want to validate this file against another schema
> >
> > say in "/home/paul/true_sample.xsd", is there a way I
> >
> > can do it without modifying sample.xml?
> >
> >  
> >
> > THanks for the help,
> >
> > -Paul
> >
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 
> 


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


Re: Validating xml file against a different schema

Posted by Justin Lipton <ju...@ns.xn.com.au>.
You can write your own EntityResolver to achieve this.

Paul wrote:

> Hi,
>
>  
>
> Using Xerces, is there a way I can override the schema file
>
> specified in the XML file instance when I do the schema validation?
>
>  
>
> What I mean is if I have this in my sample.xml
>
>  
>
> xsi:noNamespaceSchemaLocation="/home/paul/sample.xsd"
>
>  
>
> and I want to validate this file against another schema
>
> say in "/home/paul/true_sample.xsd", is there a way I
>
> can do it without modifying sample.xml?
>
>  
>
> THanks for the help,
>
> -Paul
>




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