InputSource.setSystemId() is the method. More info here [1].

[1] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/InputSource.html#setSystemId(java.lang.String)

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

"Kurt Roy" <[EMAIL PROTECTED]> wrote on 05/24/2007 01:06:57 AM:

> 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to