This package, SAX2-ext, is an extension package for SAX2. It is designed both to allow SAX drivers to pass certain types of none-core information to applications and to serve as a simple model for other SAX2 extension packages.
NOTE: this package alone does add any functionality; it simply provides optional interfaces for SAX2 drivers to use. You must find a SAX2 driver that supports these interfaces if you actually want to have access to lexical and declaration information.
The SAX2-ext package currently contains two extension handlers for SAX2:
This package is independent of the SAX2 core, and that independence has several consequences:
To set a LexicalHandler, for example, you need to do something like this:
LexicalHandler lh = new MyLexicalHandler(); try { xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", lh); } catch (SAXException e) { System.out.println("LexicalHandler not supported by this SAX2 driver."); }
Here is a full definition of the two new SAX2 properties introduced in this version of SAX2-ext:
http://xml.org/sax/properties/lexical-handler
org.xml.sax.ext.LexicalHandler
http://xml.org/sax/properties/declaration-handler
org.xml.sax.ext.DeclHandler
I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and release all of the SAX 2.0 source code, compiled code, and documentation contained in this distribution into the Public Domain. SAX comes with NO WARRANTY or guarantee of fitness for any purpose.
David Megginson, david@megginson.com
2000-05-05