Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XSD Schema and Validation problems

xom-interest AT

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: peter murray-rust <pm286 AT>
  • To: Steve Loughran <steve.loughran AT>
  • Cc: xom-interest <xom-interest AT>
  • Subject: Re: [XOM-interest] XSD Schema and Validation problems
  • Date: Mon, 19 Dec 2005 14:21:04 +0000

At 13:30 19/12/2005, Steve Loughran wrote:

sometimes xerces doesnt like spaces in filenames. Those schema
locations should not have spaces in, but %20 bits where they go. You
can use File.toURI or something to create valid uris. But personally,
I'd leave them out altogether.

Thanks - I hate spaces in filenames and never use them - I think they are being added by some relative addressing process


you need to look at how you can point xerces at schema locations.
There are properties for that, and for generic JAXP parsers (as a

This is Ant 1.7's schemavalidate task:

I use a catalog myself, which registers the stuff with xerces, but
also registers itself to resolve any URL, and returns the files that
are included on the classpath:

I've found that matching on the last thing on the path works best, for
reasons I dont understand.

> I would be grateful for pointers as to how to mend this and also ways
> of schema validation which do not require embedding absolute or
> relative addresses within the XML instances.

use a catalog; hand it off to your parser to resolve things and return
files on the classpath; add **/*.xsd to your JAR. Add some logging to
the catalog for extra diagnostics of trouble.

Thanks again,
This has given me courage to return to catalogs (which I used under SGML but for which there was limited support at the time). Sounds like they have a better toolkit now.


Peter Murray-Rust
Unilever Centre for Molecular Sciences Informatics
University of Cambridge,
Lensfield Road, Cambridge CB2 1EW, UK

Archive powered by MHonArc 2.6.24.

Top of Page