You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/02/01 01:39:32 UTC
DO NOT REPLY [Bug 6166] New: -
resolveEntity() passed null systemId
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6166>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6166
resolveEntity() passed null systemId
Summary: resolveEntity() passed null systemId
Product: Xerces2-J
Version: 2.0.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: SAX
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: kingb_98@yahoo.com
The resolveEntity() method is passed a null systemId. I included a test case
below. In Xerces2 beta4 resolveEntity() gets systemId=foo.dtd, but in the
release version it gets systemId=null.
import java.io.*;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
public class TestEntity {
public static void main(String [] args) throws Exception {
SAXParserFactory parserFactory = SAXParserFactory.newInstance();
parserFactory.setValidating(true);
SAXParser parser = parserFactory.newSAXParser();
Reader r = new StringReader("<!DOCTYPE foo SYSTEM \"foo.dtd\">
<foo/>");
parser.parse(new InputSource(r), new MyBase());
}
}
class MyBase extends DefaultHandler {
public InputSource
resolveEntity (String publicId, String systemId) throws SAXException {
System.err.println("resolveEntity publicId="
+ publicId + " systemId=" + systemId);
return null;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org