jlibs.xml.sax
Interface SAXFeatures


public interface SAXFeatures

This interface contains constants for various SAX Features.

Author:
Santhosh Kumar T

Field Summary
static String EXTERNAL_GENERAL_ENTITIES
          Reports whether this parser processes external general entities
static String EXTERNAL_PARAMETER_ENTITIES
          Reports whether this parser processes external parameter entities
static String IS_STANDALONE
          May be examined only during a parse, after the startDocument() callback has been completed; read-only.
static String LEXICAL_HANDLER_PARAMETER_ENTITIES
          A value of "true" indicates that the LexicalHandler will report the beginning and end of parameter entities.
static String NAMESPACE_PREFIXES
          A value of "true" indicates that XML qualified names (with prefixes) and attributes (including xmlns* attributes) will be available.
static String NAMESPACES
          A value of "true" indicates namespace URIs and unprefixed local names for element and attribute names will be available.
static String RESOLVE_DTD_URIS
          A value of "true" indicates that system IDs in declarations will be absolutized (relative to their base URIs) before reporting.
static String STRING_INTERNING
          Has a value of "true" if all XML names (for elements, prefixes, attributes, entities, notations, and local names), as well as Namespace URIs, will have been interned using java.lang.String.intern.
static String UNICODE_NORMALIZATION_CHECKING
          Controls whether the parser reports Unicode normalization errors as described in section 2.13 and Appendix B of the XML 1.1 Recommendation.
static String USE_ATTRIBUTES2
          Returns "true" if the Attributes objects passed by this parser in ContentHandler.startElement() implement the org.xml.sax.ext.Attributes2 interface.
static String USE_ENTITY_RESOLVER2
          Returns "true" if, when setEntityResolver is given an object implementing the org.xml.sax.ext.EntityResolver2 interface, those new methods will be used.
static String USE_LOCATOR2
          Returns "true" if the Locator objects passed by this parser in ContentHandler.setDocumentLocator() implement the org.xml.sax.ext.Locator2 interface.
static String VALIDATION
          Controls whether the parser is reporting all validity errors
static String XML_1_1
          Returns "true" if the parser supports both XML 1.1 and XML 1.0.
static String XML_URIS
          Controls whether, when the namespace-prefixes feature is set, the parser treats namespace declaration attributes as being in the http://www.w3.org/2000/xmlns/ namespace.
 

Field Detail

NAMESPACES

static final String NAMESPACES
A value of "true" indicates namespace URIs and unprefixed local names for element and attribute names will be available.

Default: true
Access: (parsing) read-only; (not parsing) read/write
Note: If the validation feature is set to true, then the document must contain a grammar that supports the use of namespaces

See Also:
Constant Field Values

NAMESPACE_PREFIXES

static final String NAMESPACE_PREFIXES
A value of "true" indicates that XML qualified names (with prefixes) and attributes (including xmlns* attributes) will be available.

Default: false
Access: (parsing) read-only; (not parsing) read/write

See Also:
Constant Field Values

VALIDATION

static final String VALIDATION
Controls whether the parser is reporting all validity errors

Default: false
Access: (parsing) read-only; (not parsing) read/write
Note: If this feature is set to true, the document must specify a grammar. If this feature is set to false, the document may specify a grammar and that grammar will be parsed but no validation of the document contents will be performed.

See Also:
Constant Field Values

EXTERNAL_GENERAL_ENTITIES

static final String EXTERNAL_GENERAL_ENTITIES
Reports whether this parser processes external general entities

Default:unspecified
Access: (parsing) read-only; (not parsing) read/write
Note: always true if validating

See Also:
Constant Field Values

EXTERNAL_PARAMETER_ENTITIES

static final String EXTERNAL_PARAMETER_ENTITIES
Reports whether this parser processes external parameter entities

Default:unspecified
Access: (parsing) read-only; (not parsing) read/write
Note: always true if validating

See Also:
Constant Field Values

IS_STANDALONE

static final String IS_STANDALONE
May be examined only during a parse, after the startDocument() callback has been completed; read-only. The value is true if the document specified standalone="yes" in its XML declaration, and otherwise is false.

Default:not-applicable
Access: (parsing) read-only; (not parsing) read/write

See Also:
Constant Field Values

LEXICAL_HANDLER_PARAMETER_ENTITIES

static final String LEXICAL_HANDLER_PARAMETER_ENTITIES
A value of "true" indicates that the LexicalHandler will report the beginning and end of parameter entities. access: read/write default: unspecified

See Also:
Constant Field Values

RESOLVE_DTD_URIS

static final String RESOLVE_DTD_URIS
A value of "true" indicates that system IDs in declarations will be absolutized (relative to their base URIs) before reporting. (That is the default behavior for all SAX2 XML parsers.) A value of "false" indicates those IDs will not be absolutized; parsers will provide the base URI from Locator.getSystemId(). This applies to system IDs passed in DTDHandler.notationDecl(), DTDHandler.unparsedEntityDecl(), and DeclHandler.externalEntityDecl(). It does not apply to EntityResolver.resolveEntity(), which is not used to report declarations, or to LexicalHandler.startDTD(), which already provides the non-absolutized URI. access: read/write default: true

See Also:
Constant Field Values

STRING_INTERNING

static final String STRING_INTERNING
Has a value of "true" if all XML names (for elements, prefixes, attributes, entities, notations, and local names), as well as Namespace URIs, will have been interned using java.lang.String.intern. This supports fast testing of equality/inequality against string constants, rather than forcing slower calls to String.equals().

Default:unspecified
Access: (parsing) read-only; (not parsing) read/write

See Also:
Constant Field Values

UNICODE_NORMALIZATION_CHECKING

static final String UNICODE_NORMALIZATION_CHECKING
Controls whether the parser reports Unicode normalization errors as described in section 2.13 and Appendix B of the XML 1.1 Recommendation. If true, Unicode normalization errors are reported using the ErrorHandler.error() callback. Such errors are not fatal in themselves (though, obviously, other Unicode-related encoding errors may be). access: read/write default: false

See Also:
Constant Field Values

USE_ATTRIBUTES2

static final String USE_ATTRIBUTES2
Returns "true" if the Attributes objects passed by this parser in ContentHandler.startElement() implement the org.xml.sax.ext.Attributes2 interface. That interface exposes additional DTD-related information, such as whether the attribute was specified in the source text rather than defaulted. access: read-only default: not-applicable

See Also:
Constant Field Values

USE_LOCATOR2

static final String USE_LOCATOR2
Returns "true" if the Locator objects passed by this parser in ContentHandler.setDocumentLocator() implement the org.xml.sax.ext.Locator2 interface. That interface exposes additional entity information, such as the character encoding and XML version used. access: read-only default: not-applicable

See Also:
Constant Field Values

USE_ENTITY_RESOLVER2

static final String USE_ENTITY_RESOLVER2
Returns "true" if, when setEntityResolver is given an object implementing the org.xml.sax.ext.EntityResolver2 interface, those new methods will be used. Returns "false" to indicate that those methods will not be used. access: read-write default: true

See Also:
Constant Field Values

XML_URIS

static final String XML_URIS
Controls whether, when the namespace-prefixes feature is set, the parser treats namespace declaration attributes as being in the http://www.w3.org/2000/xmlns/ namespace. By default, SAX2 conforms to the original "Namespaces in XML" Recommendation, which explicitly states that such attributes are not in any namespace. Setting this optional flag to "true" makes the SAX2 events conform to a later backwards-incompatible revision of that recommendation, placing those attributes in a namespace. access: read-write default: false

See Also:
Constant Field Values

XML_1_1

static final String XML_1_1
Returns "true" if the parser supports both XML 1.1 and XML 1.0. Returns "false" if the parser supports only XML 1.0. access: read-write default: not-applicable

See Also:
Constant Field Values


Copyright © 2015. All rights reserved.