Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Resolving entities etc.

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: m.darlison AT ucl.ac.uk
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Resolving entities etc.
  • Date: Wed, 30 Jun 2004 16:03:18 -0400

At 6:31 PM +0100 6/30/04, Matthew Darlison wrote:

<!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "office.dtd">

is what they say, which seems odd since the files are all zipped up
inside an OpenOffice file... so there is no local directory there per
se - they'd have to be in the root of the .zip (.sxw), which they
aren't... they're off in OpenOffice.org's installation tree... and as
they the files seem not to parse "out of the zip", I can't get in to
fix them...

office.dtd is not a file name. It's a relative URL. I'm not sure what the base URL would be in this case, but I think it makes sense to expect it to be at the same place in the zip archive. If it isn't, then yes, you really do need to key off the public ID instead. For the moment this is going to require either a catalog resolver or a custom SAX EntitytResolver. For the former see Item 47 of Effefctive XML, available here:

http://www.cafeconleche.org/books/effectivexml/chapters/47.html

For the latter, see Chapter 7 of Processing XML with Java, especially http://www.cafeconleche.org/books/xmljava/chapters/ch07s02.html#d0e10350

--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA



Archive powered by MHonArc 2.6.24.

Top of Page