Parsing XML with invalid URI for DTD
When parsing an XML file (with aelfred2) I get the following error:
Exception in thread "main" gnu.xml.dom.ls.DomLSException: Absolute URL required with null context: CQCGWProtocol.DTD
at gnu.xml.dom.ls.DomLSParser.doParse(libgcj.so.7)
at gnu.xml.dom.ls.DomLSParser.parse(libgcj.so.7)
at gnu.xml.dom.DomDocumentBuilder.parse(libgcj.so.7)
at CQC.main(CQC.java:44)
Caused by: java.net.MalformedURLException: Absolute URL required with null context: CQCGWProtocol.DTD
at java.net.URL.<init>(libgcj.so.7)
at java.net.URL.<init>(libgcj.so.7)
at gnu.xml.aelfred2.XmlParser.pushURL(libgcj.so.7)
at gnu.xml.aelfred2.XmlParser.parseDoctypedecl(libgcj.so.7)
at gnu.xml.aelfred2.XmlParser.parseProlog(libgcj.so.7)
at gnu.xml.aelfred2.XmlParser.parseDocument(libgcj.so.7)
...
I'm puzzled, as I have disabled validation:
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setIgnoringComments(true);
domFactory.setNamespaceAware(false);
domFactory.setValidating(false);
My goal is to have the parser ignore the DOCTYPE tag and not try to find the DTD. Can someone suggest how you turn this off - apparently, setting the validation to false is not the right approach.
I'm running Java 1.4.2 on Fidora Core 5.
Thanks for suggestions!

