<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#" xmlns:foaf="http://xmlns.com/foaf/0.1/">
<info>
    
    
    
    
    
    
    
    
<title>Changing SAX?</title><biblioid class="uri">http://norman.walsh.name/2006/02/23/changingSAX</biblioid>
<volumenum>9</volumenum>
<issuenum>22</issuenum>
<pubdate>2006-02-23T09:58:18-05:00</pubdate>
<date>$Date: 2006-02-23 10:27:43 -0500 (Thu, 23 Feb 2006) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2006</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>Yesterday, the question was <citetitle>XHTML™ Modularization
1.1</citetitle>, today it's SAX.</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Java"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#XML"/>
</info>

<para xml:id="p1">Apropos of
<link xlink:href="../22/xhtml11mod">the question</link>
“how many changes can be introduced into a document without subjecting
it to technical review”, can I make a really, really small change to
SAX?</para>

<para xml:id="p2">The problem is the following bug report:</para>

<blockquote>
<para xml:id="p3"><exceptionname>SAXException</exceptionname> can take a nested
exception, but it doesn't implement the
<methodname>getCause</methodname> method, so it doesn't participate in
the exception nesting mechanism introduced in JDK 1.4.</para>

<para xml:id="p4">Because of this, when one prints out
"<code>e.printStackTrace()</code>", it doesn't show exceptions nested
inside <exceptionname>SAXException</exceptionname>.</para>
</blockquote>

<para xml:id="p5">The proposed fix is straightforward, simply add:</para>

<programlisting>public Throwable getCause() {
  return exception;
}</programlisting>

<para xml:id="p6">to <package>org.xml.sax.SAXException</package>.
I don't believe that this introduces any compatibility problems.
Under JDK 1.4 and beyond, <methodname>getCause</methodname> is already
inherited from <classname>Throwable</classname> and I don't think the
extra method will cause any problems under JDK 1.3 and earlier (but
I could be wrong about that, I haven't really investigated it and I don't
claim to be a master of JDK compatibility rules by any means).</para>

<para xml:id="p7">That said, as the specification lead for
<link xlink:href="http://www.jcp.org/en/jsr/detail?id=206">JAXP</link>,
I'm very reluctant to introduce <emphasis>any</emphasis> changes into
the endorsed API, no matter how small, without community support.</para>

<para xml:id="p8">The submitter opines, “I understand the hesitation. On the other
hand, people are wasting their time because we don't have these three
lines.” I understand that too.</para>

<para xml:id="p9">At least there's
<link xlink:href="http://sourceforge.net/mailarchive/forum.php?forum_id=1472">somewhere I can ask</link>.
I have exactly the same problem with another specification, except
without that luxury.</para>

<para xml:id="p10">I just hope consensus builds quickly because the window for
making this change for JAXP 1.4 is <emphasis>really, really</emphasis>
small.</para>

</essay>

