public static final class XmlReadingFeatures.Xerces.General extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ALLOW_JAVA_ENCODINGS
true : Allow Java encoding names in XMLDecl and
TextDecl line. |
static String |
CONTINUE_AFTER_FATAL_ERROR
true : Attempt to continue parsing after a fatal error. |
static String |
DISALLOW_DOCTYPE_DECLARATION
true : A fatal error is thrown if the incoming document contains a
DOCTYPE declaration. |
static String |
EXTERNAL_GENERAL_ENTITIES
true (default): Include external general entities. |
static String |
EXTERNAL_PARAMETER_ENTITIES
true (default): Include external parameter entities and the external
DTD subset. |
static String |
GENERATE_SYNTHETIC_ANNOTATIONS
true : Enable generation of synthetic annotations. |
static String |
HONOUR_ALL_SCHEMA_LOCATIONS
true : All schema location hints will be used to locate the components
for a given target namespace. |
static String |
NAMESPACES
true (default): Perform namespace processing: prefixes will be
stripped off element and attribute names and replaced with the corresponding
namespace URIs. |
static String |
NONVALIDATING_LOAD_DTD_GRAMMAR
true (default): Load the DTD and use it to add default attributes and
set attribute types when parsing. |
static String |
NONVALIDATING_LOAD_EXTERNAL_DTD
true (default): Load the external DTD. |
static String |
SCANNER_NOTIFY_BUILTIN_REFERENCES
true : Notifies the handler of built-in entity boundaries (e.g
& ) in the document via the start /endEntity
callbacks. |
static String |
SCANNER_NOTIFY_CHARACTER_REFERENCES
true : Notifies the handler of character reference boundaries in the
document via the start /endEntity callbacks. |
static String |
STANDARD_URI_CONFORMANT
true : Requires that a URI has to be provided where a URI is expected. |
static String |
USE_ENTITY_RESOLVER_2
true (default): The methods of the
EntityResolver2 interface will be used when an object
implementing this interface is registered with the parser using
setEntityResolver . |
static String |
VALIDATE_ANNOTATIONS
true : Schema annotations will be laxly validated against available
schema components. |
static String |
VALIDATION
true : Validate the document and report validity errors. |
static String |
VALIDATION_ASSERT_COMMENTS_AND_PI_CHECKING
true : Enable occurrence of comments and PIs within XPath Data Model
(XDM) instance, for XSD 1.1 assertion processing. |
static String |
VALIDATION_BALANCE_SYNTAX_TREES
true : Construct an optimal representation for DTD content models to
significantly reduce the likelihood a StackOverflowError
will occur when large content models are processed. |
static String |
VALIDATION_CTA_FULL_XPATH_CHECKING
true : Enable XSD 1.1 CTA full XPath 2.0 checking. |
static String |
VALIDATION_DYNAMIC
true : The parser will validate the document only if a grammar is
specified. |
static String |
VALIDATION_ID_IDREF_CHECKING
true (default): Enable checking of ID/IDREF constraints. |
static String |
VALIDATION_IDENTITY_CONSTRAINT_CHECKING
true (default): Enable identity constraint checking. |
static String |
VALIDATION_SCHEMA
true : Turn on XML Schema validation by inserting an XML Schema
validator into the pipeline. |
static String |
VALIDATION_SCHEMA_AUGMENT_POST_SCHEMA_VALIDATION_INFOSET
true (default): Augment Post-Schema-Validation-Infoset. |
static String |
VALIDATION_SCHEMA_ELEMENT_DEFAULT
true (default): Send XML Schema element default values via
characters() . |
static String |
VALIDATION_SCHEMA_FULL_CHECKING
true : Enable full schema grammar constraint checking, including
checking which may be time-consuming or memory intensive. |
static String |
VALIDATION_SCHEMA_IGNORE_XSI_TYPE_UNTIL_ELEMENT_DECLARATION
true : xsi:type attributes will be ignored until a global
element declaration has been found, at which point xsi:type
attributes will be processed on the element for which the global element
declaration was found as well as its descendants. |
static String |
VALIDATION_SCHEMA_NORMALIZED_VALUE
true (default): Expose via SAX and DOM XML Schema normalized values
for attributes and elements. |
static String |
VALIDATION_UNPARSED_ENTITY_CHECKING
true (default): Check that each value of type ENTITY matches
the name of an unparsed entity declared in the DTD. |
static String |
VALIDATION_WARN_ON_DUPLICATE_ATTRIBUTE_DEFINITION
true : Report a warning when a duplicate attribute is re-declared. |
static String |
VALIDATION_WARN_ON_UNDECLARED_ELEMENT_DEFINITION
true : Report a warning if an element referenced in a content model is
not declared. |
static String |
WARN_ON_DUPLICATE_ENTITY_DEFINITION
true : Report a warning for duplicate entity declaration. |
static String |
XINCLUDE
true : Enable XInclude processing. |
static String |
XINCLUDE_FIXUP_BASE_URIS
true (default): Perform base URI fixup as specified by the XInclude
Recommendation. |
static String |
XINCLUDE_FIXUP_LANGUAGE
true (default): Perform language fixup as specified by the XInclude
Recommendation. |
public static final String NAMESPACES
true
(default): Perform namespace processing: prefixes will be
stripped off element and attribute names and replaced with the corresponding
namespace URIs. By default, the two will simply be concatenated, but the
namespace-sep core property allows the application to specify a delimiter
string for separating the URI part and the local part.
false
: Do not perform namespace processing.
Access: read-only (parsing), read-write (not parsing)
Note: If the validation feature is set to true
, then the document
must contain a grammar that supports the use of namespaces.
public static final String USE_ENTITY_RESOLVER_2
true
(default): The methods of the
EntityResolver2
interface will be used when an object
implementing this interface is registered with the parser using
setEntityResolver
.
false
: The methods of the EntityResolver2
interface will not be used.
Access: read-write
Note: If the disallow DOCTYPE
declaration feature is set to
true
EntityResolver2.getExternalSubset(String, String)
will not be called when the document contains no DOCTYPE
declaration.
DISALLOW_DOCTYPE_DECLARATION
,
VALIDATION
,
NONVALIDATING_LOAD_EXTERNAL_DTD
public static final String VALIDATION
true
: Validate the document and report validity errors.
false
(default): Do not report validity errors.
Access: read-only (parsing), read-write (not parsing)
Note: If this feature is set to true
, the document must specify a
grammar. By default, validation will occur against DTD. For more information,
please, refer to the FAQ. If this feature is set to false
, and
document specifies a grammar that grammar might be parsed but no validation
of the document contents will be performed.
public static final String VALIDATION_DYNAMIC
true
: The parser will validate the document only if a grammar is
specified.
false
(default): Validation is determined by the state of the
validation feature.
VALIDATION
public static final String VALIDATION_SCHEMA
true
: Turn on XML Schema validation by inserting an XML Schema
validator into the pipeline.
false
(default): Do not report validation errors against XML Schema.
Access: read-only (parsing), read-write (not parsing)
Note: Validation errors will only be reported if the validation feature is
set to true
. For more information, please, refer to the FAQ
Checking of constraints on a schema grammar which are either time-consuming
or memory intensive such as unique particle attribution will only occur if
the schema full checking feature is set to true
.
VALIDATION
,
VALIDATION_DYNAMIC
,
NAMESPACES
public static final String VALIDATION_SCHEMA_FULL_CHECKING
true
: Enable full schema grammar constraint checking, including
checking which may be time-consuming or memory intensive. Currently, unique
particle attribution constraint checking and particle derivation restriction
checking are controlled by this option.
false
(default): Disable full constraint checking.
Note: This feature checks the Schema grammar itself for additional errors that are time-consuming or memory intensive. It does not affect the level of checking performed on document instances that use Schema grammars.
public static final String VALIDATION_SCHEMA_NORMALIZED_VALUE
true
(default): Expose via SAX and DOM XML Schema normalized values
for attributes and elements.
false
: Expose the infoset values
Access: read-only (parsing), read-write (not parsing)
Note: XML Schema normalized values will be exposed only if both schema
validation and validation features are set to true
.
public static final String VALIDATION_SCHEMA_ELEMENT_DEFAULT
true
(default): Send XML Schema element default values via
characters()
.
false
: Do not send XML Schema default values in XNI
Access: read-only (parsing), read-write (not parsing)
Note: XML Schema default values will be send via characters()
if both
schema validation and validation features are set to true
.
public static final String VALIDATION_SCHEMA_AUGMENT_POST_SCHEMA_VALIDATION_INFOSET
true
(default): Augment Post-Schema-Validation-Infoset.
false
: Do not augment Post-Schema-Validation-Infoset.
Access: read-only (parsing), read-write (not parsing)
Note: This feature can be turned off to improve parsing performance.
VALIDATION
,
VALIDATION_SCHEMA
public static final String VALIDATION_SCHEMA_IGNORE_XSI_TYPE_UNTIL_ELEMENT_DECLARATION
true
: xsi:type
attributes will be ignored until a global
element declaration has been found, at which point xsi:type
attributes will be processed on the element for which the global element
declaration was found as well as its descendants.
false
(default): Do not ignore xsi:type
attributes.
Access: read-only (parsing), read-write (not parsing)
VALIDATION
,
VALIDATION_SCHEMA
public static final String GENERATE_SYNTHETIC_ANNOTATIONS
true
: Enable generation of synthetic annotations. A synthetic
annotation will be generated when a schema component has non-schema
attributes but no child annotation.
false
(default): Do not generate synthetic annotations.
Access: read-only (parsing), read-write (not parsing)
VALIDATION
,
VALIDATION_SCHEMA
,
VALIDATE_ANNOTATIONS
public static final String VALIDATE_ANNOTATIONS
true
: Schema annotations will be laxly validated against available
schema components.
false
(default): Do not validate schema annotations.
Access: read-only (parsing), read-write (not parsing)
VALIDATION
,
VALIDATION_SCHEMA
,
GENERATE_SYNTHETIC_ANNOTATIONS
public static final String HONOUR_ALL_SCHEMA_LOCATIONS
true
: All schema location hints will be used to locate the components
for a given target namespace.
false
(default): Only the first schema location hint encountered by
the processor will be used to locate the components for a given target
namespace.
Access: read-only (parsing), read-write (not parsing)
public static final String EXTERNAL_GENERAL_ENTITIES
true
(default): Include external general entities.
false
: Do not include external general entities.
Access: read-only (parsing), read-write (not parsing)
EXTERNAL_PARAMETER_ENTITIES
public static final String EXTERNAL_PARAMETER_ENTITIES
true
(default): Include external parameter entities and the external
DTD subset.
false
: Do not include external parameter entities or the external DTD
subset.
Access: read-only (parsing), read-write (not parsing)
EXTERNAL_GENERAL_ENTITIES
public static final String VALIDATION_BALANCE_SYNTAX_TREES
true
: Construct an optimal representation for DTD content models to
significantly reduce the likelihood a StackOverflowError
will occur when large content models are processed.
false
(default): Do not invest processing time to construct an
optimal representation for DTD content models.
Access: read-only (parsing), read-write (not parsing)
Note: Enabling this feature may cost your application some performance when DTDs are processed so it is recommended that it only be turned on when necessary.
public static final String VALIDATION_ID_IDREF_CHECKING
true
(default): Enable checking of ID/IDREF constraints.
false
: Disable checking of ID/IDREF constraints. Validation will not
fail if there are non-unique ID values or dangling IDREF values in the
document.
Access: read-only (parsing), read-write (not parsing)
Note: This feature only applies to schema validation.
VALIDATION
,
VALIDATION_SCHEMA
public static final String VALIDATION_IDENTITY_CONSTRAINT_CHECKING
true
(default): Enable identity constraint checking.
false
: Disable identity constraint checking.
Access: read-only (parsing), read-write (not parsing)
VALIDATION
,
VALIDATION_SCHEMA
public static final String VALIDATION_CTA_FULL_XPATH_CHECKING
true
: Enable XSD 1.1 CTA full XPath 2.0 checking.
false
(default): Disable XSD 1.1 CTA full XPath 2.0 checking.
Access: read-only (parsing), read-write (not parsing)
Note: Setting this feature to true
, would allow CTA XPath expressions
to have full XPath 2.0 syntax. The default is to recognize the CTA XPath
subset, defined by XSD 1.1 language. If the CTA XPath expressions in a schema
document falls within the XPath subset, then the use of default Xerces CTA
XPath processor may result in an efficient schema processing.
VALIDATION
,
VALIDATION_SCHEMA
public static final String VALIDATION_ASSERT_COMMENTS_AND_PI_CHECKING
true
: Enable occurrence of comments and PIs within XPath Data Model
(XDM) instance, for XSD 1.1 assertion processing.
false
(default): Disable occurrence of comments and PIs within XPath
Data Model (XDM) instance, for XSD 1.1 assertion processing.
Access: read-only (parsing), read-write (not parsing)
Note: Setting this feature to true
, would allow assertions to access
comments and PIs from an XML instance document and correspondingly test for
their absence, presence or do string processing on them for the purpose of
XSD validation.
VALIDATION
,
VALIDATION_SCHEMA
public static final String VALIDATION_UNPARSED_ENTITY_CHECKING
true
(default): Check that each value of type ENTITY
matches
the name of an unparsed entity declared in the DTD.
false
: Do not check that each value of type ENTITY
matches
the name of an unparsed entity declared in the DTD.
Access: read-only (parsing), read-write (not parsing)
Note: This feature only applies to schema validation.
VALIDATION
,
VALIDATION_SCHEMA
public static final String VALIDATION_WARN_ON_DUPLICATE_ATTRIBUTE_DEFINITION
true
: Report a warning when a duplicate attribute is re-declared.
false
(default): Do not report a warning when a duplicate attribute
is re-declared.
public static final String VALIDATION_WARN_ON_UNDECLARED_ELEMENT_DEFINITION
true
: Report a warning if an element referenced in a content model is
not declared.
false
(default): Do not report a warning if an element referenced in
a content model is not declared.
public static final String WARN_ON_DUPLICATE_ENTITY_DEFINITION
true
: Report a warning for duplicate entity declaration.
false
(default): Do not report warning for duplicate entity
declaration.
public static final String ALLOW_JAVA_ENCODINGS
true
: Allow Java encoding names in XMLDecl
and
TextDecl
line.
false
(default): Do not allow Java encoding names in XMLDecl
and TextDecl
line.
Note: A true
value for this feature allows the encoding of the file
to be specified as a Java encoding name as well as the standard ISO encoding
name. Be aware that other parsers may not be able to use Java encoding names.
If this feature is set to false
, an error will be generated if Java
encoding names are used.
public static final String CONTINUE_AFTER_FATAL_ERROR
true
: Attempt to continue parsing after a fatal error.
false
(default): Stops parse on first fatal error.
Note: The behavior of the parser when this feature is set to true
is
undetermined! Therefore use this feature with extreme caution because the
parser may get stuck in an infinite loop or worse.
public static final String NONVALIDATING_LOAD_DTD_GRAMMAR
true
(default): Load the DTD and use it to add default attributes and
set attribute types when parsing.
false
: Build the grammar but do not use the default attributes and
attribute types information it contains.
Note: This feature is always on when validation is on.
VALIDATION
,
NONVALIDATING_LOAD_EXTERNAL_DTD
public static final String NONVALIDATING_LOAD_EXTERNAL_DTD
true
(default): Load the external DTD.
false
: Ignore the external DTD completely.
Note: This feature is always on when validation is on.
VALIDATION
,
NONVALIDATING_LOAD_DTD_GRAMMAR
public static final String SCANNER_NOTIFY_CHARACTER_REFERENCES
true
: Notifies the handler of character reference boundaries in the
document via the start
/endEntity
callbacks.
false
(default): Does not notify of character reference boundaries.
SCANNER_NOTIFY_BUILTIN_REFERENCES
public static final String SCANNER_NOTIFY_BUILTIN_REFERENCES
true
: Notifies the handler of built-in entity boundaries (e.g
&
) in the document via the start
/endEntity
callbacks.
false
(default): Does not notify of built-in entity boundaries.
SCANNER_NOTIFY_CHARACTER_REFERENCES
public static final String DISALLOW_DOCTYPE_DECLARATION
true
: A fatal error is thrown if the incoming document contains a
DOCTYPE
declaration.
false
(default): DOCTYPE
declaration is allowed.
public static final String STANDARD_URI_CONFORMANT
true
: Requires that a URI has to be provided where a URI is expected.
false
(default): Some invalid URI's are accepted as valid values when
a URI is expected. Examples include: using platform dependent file separator
in place of /
; using Windows/DOS path names like C:\blah
and
\\host\dir\blah
; using invalid URI characters (space, for example).
Note: It's recommended to set this feature to true
if you want your
application/documents to be truly portable across different XML processors.
public static final String XINCLUDE
true
: Enable XInclude processing.
false
(default): Do not perform XInclude processing.
XINCLUDE_FIXUP_BASE_URIS
,
XINCLUDE_FIXUP_LANGUAGE
public static final String XINCLUDE_FIXUP_BASE_URIS
true
(default): Perform base URI fixup as specified by the XInclude
Recommendation.
false
: Do not perform base URI fixup. The XInclude processor will not
add xml:base
attributes.
XINCLUDE
Copyright © 2025. All rights reserved.