[jdom-interest] JDOMException with relative URL to DTD

Jason Hunter jhunter at servlets.com
Sun Jan 20 01:29:25 PST 2002

That would be a parser error.  Does that file exist?


Mike Hogarth wrote:
> Not sure why this is happening.
> An external system was changed and now references a DTD
> using a relative path:
> <?xml version="1.0"?>
> <!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD
> PubMedArticle, 14th January 2002//EN"
> "/entrez/query/DTD/pubmed_020114.dtd">
> This now "breaks" my application which now issues the
> following JDOM exception:
> org.jdom.JDOMException: Error on line 0: File
> "file:///entrez/query/DTD/pubmed_020114.dtd" not found.         at
> org.jdom.input.SAXBuilder.build(SAXBuilder.java:300)    at
> org.jdom.input.SAXBuilder.build(SAXBuilder.java:583)    at
> edu.ucdavis.mi.pubmed.PubMedRetriever.getRecord(PubMedRetrie
> ver.java:64)    at Demo.main(Demo.java:61)
> Any help is greatly appreciated....
> Can't tell from the XML spec which references RFC2732
> whether relative paths to DTD's is ok, but I think it is.
> Is JDOM making an incorrect reference regarding the path
> and inserting "file://"?
> I also instantiate a SAXBuilder to not validate thinking it
> would ignore any problems with a DTD...  Looks like it will
> always attempt to get the DTD even if it is not going to be
> used for validation, yes?
> I am using JDOM b7.
> Thanks in advance.
> --Mike Hogarth
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

More information about the jdom-interest mailing list