You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/03/18 09:31:24 UTC

DO NOT REPLY [Bug 4848] - ENTITYRESOLVER doesn't work with DTD's

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=4848>.
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=4848

ENTITYRESOLVER doesn't work with DTD's





------- Additional Comments From bam@snoopy.apana.org.au  2002-03-18 08:31 -------
Hello,

As of xalan-j_2_3_1, EntityResolver gets called with SystemId always set to
null. I can tell this because I inserted a line:
	System.err.println(publicId+" "+systemId);
at the top of the function.

This causes the example at
http://xml.apache.org/xalan-j/apidocs/org/xml/sax/EntityResolver.html
to fail, because it is testing null pointers.

There are several problems here:

1. EntityResolver (the example) should not assume that the parameters will not
be null, I think this is valid (???) if the DOCTYPE declaration does not specify
the value. (at least for oublicId; I am not sure about systemId).

2. systemID is null when it shouldn't be. 

3. The EntityResolver only seems to be called for the first document being
processed, and not for documents accessed via the XSLT document() function.

As an example:
<!DOCTYPE xbel PUBLIC "+//IDN python.org//DTD XML Bookmark Exchange Language
1.1//EN//XML" "/usr/share/sgml/dtd/xbel-1.1.dtd">

prints:
+//IDN python.org//DTD XML Bookmark Exchange Language 1.1//EN//XML null

Brian May <ba...@snoopy.apana.org.au>