Where do I specify the base URI?? Thanks for your help...
-----Original Message----- From: Michael Glavassevich [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 12:05 AM To: j-users@xerces.apache.org Cc: [EMAIL PROTECTED] Subject: Re: How To Specify an xsd schema in a different directory with <xsd:import> schemaLocation attribute - Get "could not find the document" on XML parse [EMAIL PROTECTED] wrote on 05/23/2007 11:26:19 PM: > I believe the default behavior for loading relative paths is to > resolve them against the "working directory" of the JRE, which would > be similar to passing a relative path to a File constructor. This is the fallback behaviour when no base URI is provided. Usually a sign a system ID wasn't set on the InputSource passed to the parse() method or on one returned from an EntityResolver. > To provide more deterministic resolution, you can use the > EntityResolver interface [1] if you're using SAX parsing. If you're > using a more recent JAXP version, such as what's available in Java 5, > you can setup an LSResourceResolve [2] on a SchemaFactory [3]. > > I've never personally tried the later. > > -Nathan > > [1] http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/EntityResolver.html > [2] http://java.sun.com/j2se/1.5. > 0/docs/api/org/w3c/dom/ls/LSResourceResolver.html > [3] http://java.sun.com/j2se/1.5. > 0/docs/api/javax/xml/validation/SchemaFactory.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]