[jdom-interest] SAXHandler patch

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed May 7 11:00:47 PDT 2003


The attached patch for SAXHandler adds BaseURI support for Document 
objects to the SAXHandler class. It also corrcts a minor typo (where 
instead of were) in the JavaDoc for this class.

While testing this patch, I noticed a significant and likely unrelated 
bug in the SAXBuilder class when loading URLs such as 
http://www.cafeconleche.org with no trailing slash. Relative URLs that 
point to DTDs from the DOCTYPE system identifier are not correctly 
resolved. I'm not sure why. However, testing on a different system 
indicates that this bug is present before my changes, so I'm going ahead 
and submitting this patch anyway. Time permitting I'll hunt that bug 
down soon unless someone else beats me to it. :-)

--
Elliotte
-------------- next part --------------
Index: src/java/org/jdom/input/SAXHandler.java
===================================================================
RCS file: /home/cvspublic/jdom/src/java/org/jdom/input/SAXHandler.java,v
retrieving revision 1.54
diff -r1.54 SAXHandler.java
103c103
<     /** Indicator of whether we previously where in a CDATA */
---
>     /** Indicator of whether we previously were in a CDATA */
286a287,292
>     public void startDocument() {
>         if (locator != null) {
>             document.setBaseURI(locator.getSystemId());
>         }
>     }    
>     


More information about the jdom-interest mailing list