You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xml-commons-dev@xerces.apache.org by Ville Skyttä <vi...@iki.fi> on 2003/06/05 20:06:45 UTC

org.xml.sax.helpers.DefaultHandler in xml-commons/JAXP

I'm wondering what is the correct method signature of
org.xml.sax.helpers.DefaultHandler.resolveEntity(), in SAX it is
declared to throw an IOException, whereas in J2SE 1.4.x, J2EE 1.3.x only
SAXException is declared (IOException is documented, which is clearly
bogus ATM, it's a checked exception but not declared).

The difference is visible here:
http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html#resolveEntity(java.lang.String,%20java.lang.String)
http://java.sun.com/j2se/1.4.1/docs/api/org/xml/sax/helpers/DefaultHandler.html#resolveEntity(java.lang.String,%20java.lang.String)

AFAICT, the IOException has always been thrown in upstream SAX.  Also,
this issue has been identified as a in-progress bug in JAXP:
http://developer.java.sun.com/developer/bugParade/bugs/4749727.html

xml-commons-1.0 followed upstream SAX, but I see this has been changed
to (bug-)compatible in tck-jaxp-1_2_0:
http://cvs.apache.org/viewcvs.cgi/xml-commons/java/external/src/org/xml/sax/helpers/DefaultHandler.java.diff?r1=1.2&r2=1.2.6.1&only_with_tag=tck-jaxp-1_2_0

However, BUGS-sax (outdated?) has a [FIXED] entry about the opposite:
http://cvs.apache.org/viewcvs.cgi/xml-commons/java/external/BUGS-sax?rev=1.1&only_with_tag=tck-jaxp-1_2_0&content-type=text/vnd.viewcvs-markup

I'm somewhat confused, and would like to hear some opinions what should
one expect to happen about this in the future.

Thanks,
-- 
\/ille Skyttä
ville.skytta at iki.fi



Re: org.xml.sax.helpers.DefaultHandler in xml-commons/JAXP

Posted by Ville Skyttä <vi...@iki.fi>.
Thanks for the clarification, Shane.  Some comments below.

On Tue, 2003-10-21 at 22:11, shane_curcuru@us.ibm.com wrote:

> In principle I'd say we'll be shipping the version that matches the 
> current JAXP 1.2 TCK, since we need to pass the TCK to have an official 
> release.

Makes sense.

>   Unfortunately this sometimes means shipping potentially 
> confusing code for those who are already expecting the latest-and-greatest 
> of all their components.

Hm, regarding this particular change, the people who are most likely to
get bitten are folks still using a < 1.4 J2SE and xml-commons-apis
1.0b2, kind of not ones who already expect the latest and greatest IMHO
:)

xml-commons-apis 1.0b2 is (sf.net) SAX 2 compatible, but incompatible
with /all/ JAXP versions wrt. this tiny bit (IIRC).  And Xerces and
friends who ship SAX APIs have since long shipped JAXP (ie. not SAX)
compatible versions.

The next version of xml-commons-apis seems to turn this around, leaving
sf.net SAX alone "incompatible" with other Java packages including SAX
APIs.

> Does that help at all?

Yes, thanks.

>   I'm too tired today to completely parse the 
> message, but does anyone believe that we still have SAX code that does not 
> match the JAXP 1.2 TCK?  If so, we need to fix it.

I don't know about this.

>   If we have code that 
> does not match sourceforge SAX release, well, then, that's too bad for 
> now.

This is what I was asking.  I think adding a note about this in the
release notes would not be a bad idea, especially because it is also an
incompatibility between xml-commons-apis 1.0b2 and $nextversion.

Cheers, \/ille


Re: org.xml.sax.helpers.DefaultHandler in xml-commons/JAXP

Posted by sh...@us.ibm.com.
Grrrr.  Trying to handle too many different standards at once is a 
headache, I agree.

In principle I'd say we'll be shipping the version that matches the 
current JAXP 1.2 TCK, since we need to pass the TCK to have an official 
release.  Unfortunately this sometimes means shipping potentially 
confusing code for those who are already expecting the latest-and-greatest 
of all their components.  I'm at least also relying on some other 
volunteers to actually run the TCK tests since I don't have them on my 
machine.

And the BUGS-sax file was just me checking in the entire SAX distribution 
as-is a long time ago; it probably hasn't been updated by anyone since 
then for bugfixes or for SAX/JAXP version updates.  Sorry!

Does that help at all?  I'm too tired today to completely parse the 
message, but does anyone believe that we still have SAX code that does not 
match the JAXP 1.2 TCK?  If so, we need to fix it.  If we have code that 
does not match sourceforge SAX release, well, then, that's too bad for 
now.  (Note: we plan to ship from the tck-jaxp-1_2_0 branch - if someone 
else has a proposal to change things on the HEAD, that's fine; we just 
can't have official releases from there until the JAXP TCK's get updated).

- Shane

Re: org.xml.sax.helpers.DefaultHandler in xml-commons/JAXP

Posted by Ville Skyttä <vi...@iki.fi>.
With the next version of xml-apis knocking on the door, could someone
shed some light on how will the problem below be addressed in the new
version?

On Thu, 2003-06-05 at 21:06, Ville Skyttä wrote:
> I'm wondering what is the correct method signature of
> org.xml.sax.helpers.DefaultHandler.resolveEntity(), in SAX it is
> declared to throw an IOException, whereas in J2SE 1.4.x, J2EE 1.3.x only
> SAXException is declared (IOException is documented, which is clearly
> bogus ATM, it's a checked exception but not declared).
> 
> The difference is visible here:
> http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html#resolveEntity(java.lang.String,%20java.lang.String)
> http://java.sun.com/j2se/1.4.1/docs/api/org/xml/sax/helpers/DefaultHandler.html#resolveEntity(java.lang.String,%20java.lang.String)
> 
> AFAICT, the IOException has always been thrown in upstream SAX.  Also,
> this issue has been identified as a in-progress bug in JAXP:
> http://developer.java.sun.com/developer/bugParade/bugs/4749727.html
> 
> xml-commons-1.0 followed upstream SAX, but I see this has been changed
> to (bug-)compatible in tck-jaxp-1_2_0:
> http://cvs.apache.org/viewcvs.cgi/xml-commons/java/external/src/org/xml/sax/helpers/DefaultHandler.java.diff?r1=1.2&r2=1.2.6.1&only_with_tag=tck-jaxp-1_2_0
> 
> However, BUGS-sax (outdated?) has a [FIXED] entry about the opposite:
> http://cvs.apache.org/viewcvs.cgi/xml-commons/java/external/BUGS-sax?rev=1.1&only_with_tag=tck-jaxp-1_2_0&content-type=text/vnd.viewcvs-markup
> 
> I'm somewhat confused, and would like to hear some opinions what should
> one expect to happen about this in the future.
> 
> Thanks,