David Megginson has released SAX 2.0.2. "This mini-release is intended mainly to add support for XML 1.1 and Namespaces 1.1, including Unicode normalization. The changes are all in features, properties, and JavaDoc, not in the actual class and method signatures; since the new features and properties are optional, existing libraries should continue to work with the new release." New features in this release include:
Attributes2
interface exposes which attributes were specified in the source text, rather than defaulted through the DTD. The http://xml.org/sax/features/use-attributes2
is true if the parser passes Attributes2
objects to startElement()
. DefaultHandler2
extends org.xml.sax.helpers.DefaultHandler
and additonally implements DeclHandler
, LexicalHandler
, and EntityResolver2
with do-nothing methods.EntityResolver2
can provide external DTD subsets for documents that don't have one and provides a resolveEntity()
method with more parameters, which lets you cope with situations where the base URI of the document and the entity declaration have become mismatched.
The http://xml.org/sax/features/use-entity-resolver2
feature determines whether the parser will use EntityResolver2
methods where appropriate.Locator2
interface exposes the version (1.0 or 1.1) and encoding of the current entity. If it's unclear to you what this has to do with location information, you're not alone.
The http://xml.org/sax/features/use-locator2
feature is true if the Locator object passed to ContentHandler.setDocumentLocator()
supports the new Locator2
interface. http://xml.org/sax/features/is-standalone
feature is true if and only if the document is declared to be standalonehttp://xml.org/sax/features/resolve-dtd-uris
feature can be set to false to prevent DTDHandler and DeclHandler from absolutizing system IDs.This should all be bundled with Xerces-J 2.7 in the near future, and Java 1.5 a little further out.