SV: [jdom-interest] DTD location problem

Per Norrman pernorrman at telia.com
Mon Feb 23 17:09:56 PST 2004


My guess is that you're reading the XML document from an InputStream. It
worked
previously because in your tests you run the program from the DTD
directory. You have
now changed  the way you start the program (as a service perhaps) and
the current
directory has changed. When reading from an input stream, the parser
must somehow
be told of a base URI in order to be able to resolve relative URIs
(which is what you have in
your DOCTYPE). 
 
You can either build your document from an URL (a file  URL is fine) or
provide
the builder with an EntityResolver, which knows where to find the DTD.
 
/pmn
 
-----Ursprungligt meddelande-----
Från: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org]
För Jason Long
Skickat: den 20 februari 2004 06:10
Till: JDOM
Ämne: [jdom-interest] DTD location problem


I am getting the following error:
org.jdom.JDOMException: XSLT Transformation failed:
org.jdom.JDOMException: DTD parsing error:
C:\WINNT\system32\inventory.dtd (The system cannot find the file
specified)
 
I am using beta9 and have been for some time, but this is a new problem
and I have not been working on this part of the application.
 
I the dtd is listed as follows:
<!DOCTYPE inventory SYSTEM "inventory.dtd">
 
The xml, xsl, and dtd file are all in the same directory.  This was
working before, and I cannot see what has broken it.  
Any advice would be greatly appreciated.
 
Thank you for your time,
 
Jason Long - CEO and Chief Software Engineer
Supernova Software - supernovasoftware.com
BS Physics, MS Chemical Engineering 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20040224/ac4166e4/attachment.htm


More information about the jdom-interest mailing list