public static final class XmlReadingFeatures.Xerces.SAX extends Object
Modifier and Type | Field and Description |
---|---|
static String |
IS_STANDALONE
true : The document specified standalone="yes" in its XML
declaration. |
static String |
LEXICAL_HANDLER_PARAMETER_ENTITIES
true (default): Report the beginning and end of parameter entities to
a registered LexicalHandler . |
static String |
NAMESPACE_PREFIXES
true : Report the original prefixed names and attributes used for
namespace declarations. |
static String |
RESOLVE_DTD_URIS
true (default): The system identifiers passed to the
notationDecl , unparsedEntityDecl , and
externalEntityDecl events will be absolutized relative to their base
URIs before reporting. |
static String |
STRING_INTERNING
true (default): All element names, prefixes, attribute names,
namespace URIs, and local names are internalized using the
String.intern() method. |
static String |
UNICODE_NORMALIZATION_CHECKING
true : Perform Unicode normalization checking (as described in section
2.13 and Appendix B of the XML 1.1 Recommendation) and report normalization
errors. |
static String |
USE_ATTRIBUTES_2
true : The Attributes objects passed by the parser in
ContentHandler.startElement(String, String, String, org.xml.sax.Attributes)
implement the Attributes2 interface. |
static String |
USE_LOCATOR_2
true : The Locator objects passed by the parser in
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
implement the Locator2 interface. |
static String |
XML_1_1
true : The parser supports both XML 1.0 and XML 1.1. |
static String |
XMLNS_URIS
true : When the namespace-prefixes feature is set to true ,
namespace declaration attributes will be reported as being in the
http://www.w3.org/2000/xmlns/ namespace. |
public static final String NAMESPACE_PREFIXES
true
: Report the original prefixed names and attributes used for
namespace declarations.
false
(default): Do not report attributes used for Namespace
declarations, and optionally do not report original prefixed names.
Access: read-only (parsing), read-write (not parsing)
public static final String STRING_INTERNING
true
(default): All element names, prefixes, attribute names,
namespace URIs, and local names are internalized using the
String.intern()
method.
false
: Names are not necessarily internalized.
Access: read-only (parsing), read-write (not parsing)
Note: Xerces-J always internalizes all strings mentioned above using the
String.intern()
method. This feature can only be set to true
.
public static final String LEXICAL_HANDLER_PARAMETER_ENTITIES
true
(default): Report the beginning and end of parameter entities to
a registered LexicalHandler
.
false
: Do not report the beginning and end of parameter entities to a
registered LexicalHandler
.
public static final String IS_STANDALONE
true
: The document specified standalone="yes"
in its XML
declaration.
false
: The document specified standalone="no"
in its XML
declaration or the standalone document declaration was absent.
Access: read-only (parsing), none (not parsing)
public static final String RESOLVE_DTD_URIS
true
(default): The system identifiers passed to the
notationDecl
, unparsedEntityDecl
, and
externalEntityDecl
events will be absolutized relative to their base
URIs before reporting.
false
: System identifiers in declarations will not be absolutized
before reporting.
Note: This feature does not apply to
EntityResolver.resolveEntity(String, String)
, which is
not used to report declarations, or to
LexicalHandler.startDTD(String, String, String)
,
which already provides the non-absolutized URI.
public static final String UNICODE_NORMALIZATION_CHECKING
true
: Perform Unicode normalization checking (as described in section
2.13 and Appendix B of the XML 1.1 Recommendation) and report normalization
errors.
false
(default): Do not report Unicode normalization errors.
Note: As there is currently no support for Unicode normalization checking,
this feature can only be set to false
.
public static final String USE_ATTRIBUTES_2
true
: The Attributes objects passed by the parser in
ContentHandler.startElement(String, String, String, org.xml.sax.Attributes)
implement the Attributes2
interface.
false
: The Attributes objects passed by the parser do not implement
the Attributes2
interface.
Access: read-only
Note: Xerces-J will always report Attributes objects that also implement
Attributes2
so the value of this feature will always
be true
.
public static final String USE_LOCATOR_2
true
: The Locator
objects passed by the parser in
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
implement the Locator2
interface.
false
: The Locator
objects passed by the parser
do not implement the Locator2
interface.
Access: read-only
Note: Xerces-J will always report Locator
objects that
also implement Locator2
so the value of this feature
will always be true
.
public static final String XMLNS_URIS
true
: When the namespace-prefixes feature is set to true
,
namespace declaration attributes will be reported as being in the
http://www.w3.org/2000/xmlns/
namespace.
false
(default): Namespace declaration attributes are reported as
having no namespace.
XmlReadingFeatures.Xerces.General.NAMESPACES
,
NAMESPACE_PREFIXES
public static final String XML_1_1
true
: The parser supports both XML 1.0 and XML 1.1.
false
: The parser supports only XML 1.0.
Access: read-only
Note: The value of this feature will depend on whether the parser configuration owned by the SAX parser is known to support XML 1.1.
Copyright © 2025. All rights reserved.