logo       

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

RE: How To Specify an xsd schema in a different directory with <xsd:import>: msg#00045

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
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: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx

"Kurt Roy" <kroy@xxxxxxxxxxxxxxx> 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:mrglavas@xxxxxxxxxx] 
> Sent: Thursday, May 24, 2007 12:05 AM
> To: j-users@xxxxxxxxxxxxxxxxx
> Cc: nbeyer@xxxxxxxxx
> 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
> 
> nbeyer@xxxxxxxxx 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: mrglavas@xxxxxxxxxx
> E-mail: mrglavas@xxxxxxxxxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
> For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
> For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo