W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2011

Re: trouble creating javax.xml.validation.Validator from locally cached version of XMLSchema.xsd

From: Michael Glavassevich <mrglavas@ca.ibm.com>
Date: Tue, 4 Jan 2011 19:25:33 -0500
To: xmlschema-dev@w3.org
Message-ID: <OF1F1B960E.6E01AE3B-ON8525780F.000094A0-8525780F.000257F4@ca.ibm.com>

Michael Kay <mike@saxonica.com> wrote on 01/04/2011 06:04:05 PM:

> On 04/01/2011 22:20, Andy Davidson wrote:
> > Hi Michael
> >
> > Can you tell me more? What do you mean by a "schema processor"?
> >
> > thanks
> >
> > Andy
> >
>
> What I mean is that if you do this:
>
>          SchemaFactory factory =
>              SchemaFactory.newInstance
("http://www.w3.org/2001/XMLSchema");
>          File schemaLocation = new File("docbook.xsd");
>          Schema schema = factory.newSchema(schemaLocation);
>
> then you will have performed a much more rigorous check on the validity
> of docbook.xsd than you will get by loading it as a source document and
> validating it against XMLSchema.xsd.

It depends why you're validating. There have been a few occasions where
I've loaded XMLSchema.xsd into a SchemaFactory in order to get type
information and typed values (e.g. JAXP QNames, ints, etc...) out of a
schema document (and its annotations) that I already knew was valid.

> Michael Kay
> Saxonica

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Received on Wednesday, 5 January 2011 00:26:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:30 GMT