xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] XOMHandler with DocType.setInternalSubset() bug
- From: Wolfgang Hoschek <whoschek AT lbl.gov>
- To: xom-interest AT lists.ibiblio.org
- Cc: Elliotte Harold <elharo AT metalab.unc.edu>
- Subject: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug
- Date: Wed, 21 Sep 2005 23:56:26 -0700
A feature was recently added to XOMHandler xom CVS, perhaps for better xerces-2.7.1 support.
Unfortunately, this breaks stuff for DocType.setInternalSubset() when used with crimson as shipped with OSX java 1.4.2.
Uncommenting the following block would make the test pass again. A better fix might to only execute the block only if xerces is detected.
public void externalEntityDecl(String name,
String publicID, String systemID) {
...
if (locator != null && URIUtil.isAbsolute(systemID)) {
String documentURL = locator.getSystemId();
systemID = URIUtil.relativize(documentURL, systemID);
}
...
}
******* xerces **********
[hoschek /testsuite] export JAVA_OPTS='-Djava.endorsed.dirs=/Users/ hoschek/unix/java/share/apache/xerces-2.7.1'
[hoschek /testsuite] time fire-java nux.xom.tests.BinaryXMLTest check bnux 0 1 1 copy/copy21.xml
patchesEnabled=true
now processing copy/copy21.xml
[hoschek /testsuite]
******* crimson **********
[hoschek /testsuite] unset JAVA_OPTS
[hoschek /testsuite] time fire-java nux.xom.tests.BinaryXMLTest check bnux 0 1 1 copy/copy21.xml
patchesEnabled=true
now processing copy/copy21.xml
Exception in thread "main" nux.xom.binary.BinaryParsingException: Malformed internal DTD subset: Relative URI "ent21.xml"; can not be resolved without a base URI.
at nux.xom.binary.BinaryXMLCodec.deserialize (BinaryXMLCodec.java:463)
at nux.xom.binary.BinaryXMLCodec.deserialize (BinaryXMLCodec.java:378)
at nux.xom.tests.BinaryXMLTest.main(BinaryXMLTest.java:227)
Caused by: nu.xom.IllegalDataException: Malformed internal DTD subset: Relative URI "ent21.xml"; can not be resolved without a base URI.
at nu.xom.Verifier.checkInternalDTDSubset(Verifier.java:1423)
at nu.xom.DocType.setInternalDTDSubset(DocType.java:237)
at nux.xom.binary.BinaryXMLCodec.readDocTypeF (BinaryXMLCodec.java:1019)
at nux.xom.binary.BinaryXMLCodec.readDocumentChild (BinaryXMLCodec.java:755)
at nux.xom.binary.BinaryXMLCodec.readDocument (BinaryXMLCodec.java:693)
at nux.xom.binary.BinaryXMLCodec.deserialize (BinaryXMLCodec.java:460)
... 2 more
Caused by: org.xml.sax.SAXParseException: Relative URI "ent21.xml"; can not be resolved without a base URI.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3376)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3370)
at org.apache.crimson.parser.Parser2.resolveURI(Parser2.java: 2952)
at org.apache.crimson.parser.Parser2.maybeExternalID (Parser2.java:2924)
at org.apache.crimson.parser.Parser2.maybeEntityDecl (Parser2.java:2826)
at org.apache.crimson.parser.Parser2.maybeMarkupDecl (Parser2.java:1390)
at org.apache.crimson.parser.Parser2.maybeDoctypeDecl (Parser2.java:1324)
at org.apache.crimson.parser.Parser2.parseInternal (Parser2.java:656)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse (XMLReaderImpl.java:448)
at nu.xom.Verifier.checkInternalDTDSubset(Verifier.java:1420)
... 7 more
-
[XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Wolfgang Hoschek, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Elliotte Harold, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Wolfgang Hoschek, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Elliotte Harold, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Wolfgang Hoschek, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Elliotte Harold, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Elliotte Harold, 09/22/2005
- Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug, Wolfgang Hoschek, 09/22/2005
- Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug, Wolfgang Hoschek, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Elliotte Harold, 09/22/2005
- Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug, Wolfgang Hoschek, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Elliotte Harold, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Wolfgang Hoschek, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Elliotte Harold, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Wolfgang Hoschek, 09/22/2005
-
Re: [XOM-interest] XOMHandler with DocType.setInternalSubset() bug,
Elliotte Harold, 09/22/2005
Archive powered by MHonArc 2.6.24.