286N/A<html><head>
286N/A<!-- $Id: package.html,v 1.3 2007/10/02 19:32:24 ndw Exp $ -->
286N/A</head><body>
286N/A
286N/A<p> This package provides the core SAX APIs.
286N/ASome SAX1 APIs are deprecated to encourage integration of
286N/Anamespace-awareness into designs of new applications
286N/Aand into maintenance of existing infrastructure. </p>
286N/A
286N/A<p>See <a target='_top' href='http://www.saxproject.org'>http://www.saxproject.org</a>
286N/Afor more information about SAX.</p>
286N/A
286N/A
286N/A<h2> SAX2 Standard Feature Flags </h2>
286N/A
286N/A<p> One of the essential characteristics of SAX2 is that it added
286N/Afeature flags which can be used to examine and perhaps modify
286N/Aparser modes, in particular modes such as validation.
286N/ASince features are identified by (absolute) URIs, anyone
286N/Acan define such features.
286N/ACurrently defined standard feature URIs have the prefix
286N/A<code>http://xml.org/sax/features/</code> before an identifier such as
286N/A<code>validation</code>. Turn features on or off using
286N/A<em>setFeature</em>. Those standard identifiers are: </p>
286N/A
286N/A
286N/A<table border="1" cellpadding="3" cellspacing="0" width="100%">
286N/A <tr align="center" bgcolor="#ccccff">
286N/A <th>Feature ID</th>
286N/A <th>Access</th>
286N/A <th>Default</th>
286N/A <th>Description</th>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>external-general-entities</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>unspecified</em></td>
286N/A <td> Reports whether this parser processes external
286N/A general entities; always true if validating.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>external-parameter-entities</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>unspecified</em></td>
286N/A <td> Reports whether this parser processes external
286N/A parameter entities; always true if validating.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>is-standalone</td>
286N/A <td>(parsing) <em>read-only</em>, (not parsing) <em>none</em></td>
286N/A <td>not applicable</td>
286N/A <td> May be examined only during a parse, after the
286N/A <em>startDocument()</em> callback has been completed; read-only.
286N/A The value is true if the document specified standalone="yes" in
286N/A its XML declaration, and otherwise is false.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>lexical-handler/parameter-entities</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>unspecified</em></td>
286N/A <td> A value of "true" indicates that the LexicalHandler will report
286N/A the beginning and end of parameter entities.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>namespaces</td>
286N/A <td><em>read/write</em></td>
286N/A <td>true</td>
286N/A <td> A value of "true" indicates namespace URIs and unprefixed local names
286N/A for element and attribute names will be available.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>namespace-prefixes</td>
286N/A <td><em>read/write</em></td>
286N/A <td>false</td>
286N/A <td> A value of "true" indicates that XML qualified names (with prefixes) and
286N/A attributes (including <em>xmlns*</em> attributes) will be available.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>resolve-dtd-uris</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>true</em></td>
286N/A <td> A value of "true" indicates that system IDs in declarations will
286N/A be absolutized (relative to their base URIs) before reporting.
286N/A (That is the default behavior for all SAX2 XML parsers.)
286N/A A value of "false" indicates those IDs will not be absolutized;
286N/A parsers will provide the base URI from
286N/A <em>Locator.getSystemId()</em>.
286N/A This applies to system IDs passed in <ul>
286N/A <li><em>DTDHandler.notationDecl()</em>,
286N/A <li><em>DTDHandler.unparsedEntityDecl()</em>, and
286N/A <li><em>DeclHandler.externalEntityDecl()</em>.
286N/A </ul>
286N/A It does not apply to <em>EntityResolver.resolveEntity()</em>,
286N/A which is not used to report declarations, or to
286N/A <em>LexicalHandler.startDTD()</em>, which already provides
286N/A the non-absolutized URI.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>string-interning</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>unspecified</em></td>
286N/A <td> Has a value of "true" if all XML names (for elements, prefixes,
286N/A attributes, entities, notations, and local names),
286N/A as well as Namespace URIs, will have been interned
286N/A using <em>java.lang.String.intern</em>. This supports fast
286N/A testing of equality/inequality against string constants,
286N/A rather than forcing slower calls to <em>String.equals()</em>.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>unicode-normalization-checking</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>false</em></td>
286N/A <td> Controls whether the parser reports Unicode normalization
286N/A errors as described in section 2.13 and Appendix B of the
286N/A XML 1.1 Recommendation. If true, Unicode normalization
286N/A errors are reported using the ErrorHandler.error() callback.
286N/A Such errors are not fatal in themselves (though, obviously,
286N/A other Unicode-related encoding errors may be).
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>use-attributes2</td>
286N/A <td><em>read-only</em></td>
286N/A <td>not applicable</td>
286N/A <td> Returns "true" if the <em>Attributes</em> objects passed by
286N/A this parser in <em>ContentHandler.startElement()</em>
286N/A implement the <a href="ext/Attributes2.html"
286N/A ><em>org.xml.sax.ext.Attributes2</em></a> interface.
286N/A That interface exposes additional DTD-related information,
286N/A such as whether the attribute was specified in the
286N/A source text rather than defaulted.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>use-locator2</td>
286N/A <td><em>read-only</em></td>
286N/A <td>not applicable</td>
286N/A <td> Returns "true" if the <em>Locator</em> objects passed by
286N/A this parser in <em>ContentHandler.setDocumentLocator()</em>
286N/A implement the <a href="ext/Locator2.html"
286N/A ><em>org.xml.sax.ext.Locator2</em></a> interface.
286N/A That interface exposes additional entity information,
286N/A such as the character encoding and XML version used.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>use-entity-resolver2</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>true</em></td>
286N/A <td> Returns "true" if, when <em>setEntityResolver</em> is given
286N/A an object implementing the <a href="ext/EntityResolver2.html"
286N/A ><em>org.xml.sax.ext.EntityResolver2</em></a> interface,
286N/A those new methods will be used.
286N/A Returns "false" to indicate that those methods will not be used.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>validation</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>unspecified</em></td>
286N/A <td> Controls whether the parser is reporting all validity
286N/A errors; if true, all external entities will be read.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>xmlns-uris</td>
286N/A <td><em>read/write</em></td>
286N/A <td><em>false</em></td>
286N/A <td> Controls whether, when the <em>namespace-prefixes</em> feature
286N/A is set, the parser treats namespace declaration attributes as
286N/A being in the <em>http://www.w3.org/2000/xmlns/</em> namespace.
286N/A By default, SAX2 conforms to the original "Namespaces in XML"
286N/A Recommendation, which explicitly states that such attributes are
286N/A not in any namespace.
286N/A Setting this optional flag to "true" makes the SAX2 events conform to
286N/A a later backwards-incompatible revision of that recommendation,
286N/A placing those attributes in a namespace.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>xml-1.1</td>
286N/A <td><em>read-only</em></td>
286N/A <td>not applicable</td>
286N/A <td> Returns "true" if the parser supports both XML 1.1 and XML 1.0.
286N/A Returns "false" if the parser supports only XML 1.0.
286N/A </td>
286N/A </tr>
286N/A
286N/A</table>
286N/A
286N/A<p> Support for the default values of the
286N/A<em>namespaces</em> and <em>namespace-prefixes</em>
286N/Aproperties is required.
286N/ASupport for any other feature flags is entirely optional.
286N/A</p>
286N/A
286N/A<p> For default values not specified by SAX2,
286N/Aeach XMLReader implementation specifies its default,
286N/Aor may choose not to expose the feature flag.
286N/AUnless otherwise specified here,
286N/Aimplementations may support changing current values
286N/Aof these standard feature flags, but not while parsing.
286N/A</p>
286N/A
286N/A<h2> SAX2 Standard Handler and Property IDs </h2>
286N/A
286N/A<p> For parser interface characteristics that are described
286N/Aas objects, a separate namespace is defined. The
286N/Aobjects in this namespace are again identified by URI, and
286N/Athe standard property URIs have the prefix
286N/A<code>http://xml.org/sax/properties/</code> before an identifier such as
286N/A<code>lexical-handler</code> or
286N/A<code>dom-node</code>. Manage those properties using
286N/A<em>setProperty()</em>. Those identifiers are: </p>
286N/A
286N/A<table border="1" cellpadding="3" cellspacing="0" width="100%">
286N/A <tr align="center" bgcolor="#ccccff">
286N/A <th>Property ID</th>
286N/A <th>Description</th>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>declaration-handler</td>
286N/A <td> Used to see most DTD declarations except those treated
286N/A as lexical ("document element name is ...") or which are
286N/A mandatory for all SAX parsers (<em>DTDHandler</em>).
286N/A The Object must implement <a href="ext/DeclHandler.html"
286N/A ><em>org.xml.sax.ext.DeclHandler</em></a>.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>document-xml-version</td>
286N/A <td> May be examined only during a parse, after the startDocument()
286N/A callback has been completed; read-only. This property is a
286N/A literal string describing the actual XML version of the document,
286N/A such as "1.0" or "1.1".
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>dom-node</td>
286N/A <td> For "DOM Walker" style parsers, which ignore their
286N/A <em>parser.parse()</em> parameters, this is used to
286N/A specify the DOM (sub)tree being walked by the parser.
286N/A The Object must implement the
286N/A <em>org.w3c.dom.Node</em> interface.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>lexical-handler</td>
286N/A <td> Used to see some syntax events that are essential in some
286N/A applications: comments, CDATA delimiters, selected general
286N/A entity inclusions, and the start and end of the DTD
286N/A (and declaration of document element name).
286N/A The Object must implement <a href="ext/LexicalHandler.html"
286N/A ><em>org.xml.sax.ext.LexicalHandler</em></a>.
286N/A </td>
286N/A </tr>
286N/A
286N/A <tr>
286N/A <td>xml-string</td>
286N/A <td> Readable only during a parser callback, this exposes a <b>TBS</b>
286N/A chunk of characters responsible for the current event. </td>
286N/A </tr>
286N/A
286N/A</table>
286N/A
286N/A<p> All of these standard properties are optional;
286N/AXMLReader implementations need not support them.
286N/A</p>
286N/A
286N/A</body></html>