SAX

General
 About SAX
 Copyright Status
 Events vs. Trees
 FAQ
 Links

Java API
 Quickstart
 Features and Properties
 Filters
 Namespaces
 JavaDoc

SAX Evolution
 Genesis
 SAX 1.0 Overview
 SAX 2.0 Changes
 SAX 2.0 Extensions
 Other Languages

SourceForge Services
 Bugs/RFEs
 Project Page


SourceForge Logo

SAX 2.0 Changes

This page provides a detailed list of the changes between the different development versions of the SAX2 API. The largest changes were between SAX 1.0 and SAX 2.0beta. There was an alpha release that was substantially more like SAX 1.0, which is not described here.

Note that the changes after the SAX 2.0 release are not detailed here as much as the earlier changes, because complete CVS history (with a separate ChangeLog) is available.

Changes from SAX 2.0 r2pre3 to SAX 2.0.1

SAX 2.0.1 was released on 29 January 2002.

  • to be provided

Changes from SAX 2.0 r2pre2 to SAX 2.0 r2pre3

SAX 2.0 r2pre3 was released on 20 November 2001.

  • to be provided

Changes from SAX 2.0 r2pre1 to SAX 2.0 r2pre2

SAX 2.0 r2pre2 was released on 17 October 2001. Most of the fixes were publicly available through CVS at Sourceforge since early July, and resolved bugs filed against SAX at SourceForge.

  • to be provided

Changes from SAX 2.0 to SAX 2.0 r2pre1

SAX 2.0 r2pre1 was released on 28 December 2000.

  • to be provided

Changes from SAX 2.0prerelease to SAX 2.0

  • Documented the fact that parse() and event handlers are synchronous.
  • Documented the fact that xml: prefix never has start/endPrefixMapping events.

Changes from SAX 2.0beta2 to SAX 2.0prerelease

(See the ChangeLog included in the distribution for more detailed information.)

  • If the org.xml.sax.driver property is not specified but the SAX org.xml.sax.parser property is specified, XMLReaderFactory.createXMLReader() will attempt to create an XML1 Parser and then wrap it in a ParserAdapter.
  • DefaultHandler now throws a SAXException for its notationDecl and unparsedEntityDecl methods, so that they can be subclassed properly.
  • Bug fixed in AttributesImpl; last attribute can now be removed.
  • Added setAttributes method AttributesImpl to simplify reusing an object.
  • SAXParseException now allows a null locator argument in its constructors.
  • Specified that the ContentHandler skippedEntity method will have an entity name of "[dtd]" for the external DTD subset.
  • Specified that the ContentHandler processingInstruction method will exclude whitespace between the target and data.
  • In NamespaceSupport, setting the "" prefix to "" removes any default mapping, and changed getPrefix, getPrefixes so that they will not return the default prefix.
  • In Attributes, renamed getRawName to getQName. Likewise, in AttributesImpl, renamed setRawName to setQName.
  • Removed the org.xml.sax.ext package into a separate distribution, SAX2-ext. The DeclHandler and LexicalHandler classes are no longer part of the core SAX2 distribution.
  • Added docs/quick-start.html
  • Modified XMLReaderAdapter, ParserAdapter, and XMLFilterImpl so that parse(String) actually invokes parse(InputSource): this way, only parse(InputSource) needs to be overridden in subclasses.
  • Added getPrefix(String) and getPrefixes(String) methods to NamespaceSupport to look up currently-mapped prefixes.

Changes from SAX 2.0beta to SAX 2.0beta2

Changes from SAX 1.0 to SAX 2.0beta

The following interfaces and classes have been deprecated, and will be removed from a future version of SAX; they should be used only for interaction with SAX1 drivers or applications:

The following interfaces and classes have been added to SAX2:

SAX2 contains complete Namespace support, which is available by default from any XMLReader. An XML reader can also optionally supply raw XML 1.0 names. See the Namespaces page for more details.

An XML reader is fully configurable: it is possible to attempt to query or change the current value of any feature or property. Features and properties are identified by fully-qualified URIs, and parties are free to invent their own names for new extensions. See the Features and Properties page for more details.

The ContentHandler and Attributes interfaces are similar to the deprecated DocumentHandler and AttributeList interfaces, but they add support for Namespace-related information. ContentHandler also adds a callback for skipped entities, and Attributes adds the ability to look up an attribute's index by name.

The ParserAdapter class makes a SAX1 Parser behave as a SAX2 XMLReader. The XMLReaderAdapter class makes a SAX2 XML reader behave as a SAX1 parser. These two classes should ease the transition from SAX1 to SAX2 by allowing SAX1 drivers and clients to co-exist with SAX2 drivers and clients in the same application.

SAX1 Bugs Fixed

SAXException
Overrode java.lang.Object.toString so that an embedded exception will give a proper String representation for debugging.
ParserFactory
Added missing closing comment so that private constructor is not commented out.