xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] XML-heading causes IOException[Scanned]
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: François Beausoleil <fbos AT users.sourceforge.net>, MULS PATRICK <patrick.muls AT datassur.be>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] XML-heading causes IOException[Scanned]
- Date: Thu, 21 Aug 2003 06:56:37 -0400
At 9:50 AM -0400 8/20/03, François Beausoleil wrote:
Hello Patrick,
The problem is that your document references a relative resource,
but the resource is not accessible. You have three ways in which
you can solve that:
1. Put the SchadeAttest.dtd file at the root of your classpath, or
in the same package where the Load4XML.java file is. I don't know
how the default EntityResolver works, but it might be able to
resolve the reference.
2. Use an absolute URL to the SchadeAttest.dtd file. Something
like file:///path/to/file/SchadeAttest.dtd. Or use the http
protocol, as appropriate.
3. Implement an EntityResolver and pass that to XOM. Implementors
of EntityResolver are responsible for resolving resources and
returning them to the caller. In you case, when the systemID
contains "SchadeAttest.dtd", you would build a URL to the file, and
return that.
These should all work. However, they shouldn't be necessary. I'm
still looking at this, but I think it might be classified as a bug in
XOM and/or the Windows JDK. Interestingly the code Mr. Muls supplied
does work on Linux. I have to move it all over to my Windows laptop
and test it there.
--
Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA
-
RE: [XOM-interest] XML-heading causes IOException[Scanned],
MULS PATRICK, 08/20/2003
- RE: [XOM-interest] XML-heading causes IOException[Scanned], Elliotte Rusty Harold, 08/20/2003
- RE: [XOM-interest] XML-heading causes IOException[Scanned], Francois Beausoleil, 08/20/2003
-
Re: [XOM-interest] XML-heading causes IOException[Scanned],
François Beausoleil, 08/20/2003
-
Re: [XOM-interest] XML-heading causes IOException[Scanned],
Elliotte Rusty Harold, 08/21/2003
-
Re: [XOM-interest] XML-heading causes IOException[Scanned],
Elliotte Rusty Harold, 08/23/2003
- [XOM-interest] XOM 1.0d20 Cleaning Windows, Elliotte Rusty Harold, 08/24/2003
- Re: [XOM-interest] XML-heading causes IOException[Scanned], Elliotte Rusty Harold, 08/25/2003
-
Re: [XOM-interest] XML-heading causes IOException[Scanned],
Elliotte Rusty Harold, 08/23/2003
-
Re: [XOM-interest] XML-heading causes IOException[Scanned],
Elliotte Rusty Harold, 08/21/2003
- <Possible follow-up(s)>
- RE: [XOM-interest] XML-heading causes IOException[Scanned], MULS PATRICK, 08/20/2003
Archive powered by MHonArc 2.6.24.