xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] DTD download error while parsing XHTML document
- From: Bala B K <bkbsub AT gmail.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] DTD download error while parsing XHTML document
- Date: Mon, 15 Jun 2009 10:47:56 -0700
Hello,
I am trying to parse an HTML document with the doctype declared to use
the transitional dtd as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
When I do Builder.build on the document, I get the following exception:
java.io.IOException: Server returned HTTP response code: 503 for URL:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at nu.xom.Builder.build(Builder.java:1127)
at nu.xom.Builder.build(Builder.java:1019)
If I remove the doc type declaration, it parses just fine. I can
successfully download the dtd from my browser, which tells me that the
url is valid. I don't want to remove the doc type declaration. Is
there a way tell the builder not to download the dtd or provide it
with an alternate dtd?
Thanks,
Bala.
P.S.: I only saw one mailing list so I am posting my question here. If
there is a better xom-help or xom-users list, please let me know and I
will post my question there.
-
[XOM-interest] DTD download error while parsing XHTML document,
Bala B K, 06/15/2009
-
Re: [XOM-interest] DTD download error while parsing XHTML document,
Bala B K, 06/17/2009
- Re: [XOM-interest] DTD download error while parsing XHTML document, Elliotte Harold, 06/18/2009
-
Re: [XOM-interest] DTD download error while parsing XHTML document,
Bala B K, 06/17/2009
Archive powered by MHonArc 2.6.24.