Hi Hiranya,
  I think, an easy way to do this is to try building an XSModel pragmatically.

Here is a sample code fragment which does this:

XSLoaderImpl xsLoader = new XSLoaderImpl();
XSModel xsModel = xsLoader.loadURI(xsdUri);

We can't build an XSModel, from an invalid XML Schema document. The
call, loadURI would give an error in case of invalid Schema documents.

On Thu, Jun 11, 2009 at 2:36 PM, Hiranya
Jayathilaka<[email protected]> wrote:
> Hi Folks,
>
> I would like to know how I can validate an XML schema (1.0) document using
> Xerces2. I want  to validate  a given XML schema document against the schema
> for schemas programmatically. Can somebody please provide me the
> instructions on the right way to do this in Java? A pointer to a sample code
> fragment is most appreciated.
>
> Also can somebody tell me whether validating a schema causes any imported
> schema documents to be validated?
>
> Thanks,
> Hiranya
>
> --
> Hiranya Jayathilaka
> Software Engineer;
> WSO2 Inc.;  http://wso2.org
> E-mail: [email protected];  Mobile: +94 77 633 3491
> Blog: http://techfeast-hiranya.blogspot.com


-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to