public static final class XmlReadingProperties.Xerces.General extends Object
Modifier and Type | Field and Description |
---|---|
static XmlReadingWritableProperty<Integer> |
INPUT_BUFFER_SIZE
The size of the input buffer in the readers.
|
static XmlReadingWritableProperty<Locale> |
LOCALE
The locale to use for reporting errors and warnings.
|
static XmlReadingWritableProperty<String> |
SCHEMA_EXTERNAL_NO_NAMESPACE_SCHEMA_LOCATION
This property allows the user to specify an XML Schema with no namespace.
|
static XmlReadingWritableProperty<String> |
SCHEMA_EXTERNAL_SCHEMA_LOCATION
The XML Schema Recommendation explicitly states that the inclusion of
schemaLocation and noNamespaceSchemaLocation attributes is
only a hint; it does not mandate that these attributes must be used to locate
schemas. |
static XmlReadingWritableProperty<Object> |
SECURITY_MANAGER
It is possible to create XML documents whose processing could result in the
use of all system resources.
|
static XmlReadingWritableProperty<Object> |
VALIDATION_SCHEMA_ROOT_ELEMENT_DECLARATION
A
QName or XSElementDeclaration object
representing the top-level element declaration used when validating the root
element of a document or document fragment (also known as the validation
root). |
static XmlReadingWritableProperty<Object> |
VALIDATION_SCHEMA_ROOT_TYPE_DEFINITION
A
QName or XSTypeDefinition object
representing the top-level type definition used when validating the root
element of a document or document fragment (also known as the validation
root). |
static XmlReadingProperty<String> |
XML_STRING
Get the string of characters associated with the current event.
|
public static final XmlReadingProperty<String> XML_STRING
This property is currently not supported because the contents of the XML string returned by this property is not well defined.
public static final XmlReadingWritableProperty<String> SCHEMA_EXTERNAL_SCHEMA_LOCATION
schemaLocation
and noNamespaceSchemaLocation
attributes is
only a hint; it does not mandate that these attributes must be used to locate
schemas. Similar situation happens to <import>
element in schema
documents. This property allows the user to specify a list of schemas to use.
If the targetNamespace
of a schema (specified using this property)
matches the targetNamespace
of a schema occurring in the instance
document in schemaLocation
attribute, or if the
targetNamespace
matches the namespace attribute of <import>
element, the schema specified by the user using this property will be used
(i.e., the schemaLocation
attribute in the instance document or on
the <import>
element will be effectively ignored).
The syntax is the same as for schemaLocation
attributes in instance
documents: e.g, http://www.example.com file_name.xsd
. The user can
specify more than one XML Schema in the list.
public static final XmlReadingWritableProperty<String> SCHEMA_EXTERNAL_NO_NAMESPACE_SCHEMA_LOCATION
The syntax is a same as for the noNamespaceSchemaLocation
attribute
that may occur in an instance document: e.g. file_name.xsd
. The user
may specify only one XML Schema. For more information see the documentation
for the SCHEMA_EXTERNAL_SCHEMA_LOCATION
property.
public static final XmlReadingWritableProperty<Object> VALIDATION_SCHEMA_ROOT_ELEMENT_DECLARATION
QName
or XSElementDeclaration
object
representing the top-level element declaration used when validating the root
element of a document or document fragment (also known as the validation
root). If the value of this property is non-null the validation root will be
validated against the specified element declaration regardless of the actual
name of the root element in the instance document. If the value is a
QName
and a element declaration cannot be found
an error will be reported.
Type: QName
or
org.apache.xerces.xs.XSElementDeclaration
Note: If the VALIDATION_SCHEMA_ROOT_TYPE_DEFINITION
property has
been set this property takes precedence if its value is non-null.
If the value specified is an XSElementDeclaration
it must be an
object obtained from Xerces and must also be an object which is known to the
schema validator, for example one which would be returned from an
XMLGrammarPool
. If these constraints are not met a
ClassCastException
may be thrown or processing of substitution
groups, xsi:type
and wildcards may fail to locate otherwise available
schema components.
VALIDATION_SCHEMA_ROOT_TYPE_DEFINITION
public static final XmlReadingWritableProperty<Object> VALIDATION_SCHEMA_ROOT_TYPE_DEFINITION
QName
or XSTypeDefinition
object
representing the top-level type definition used when validating the root
element of a document or document fragment (also known as the validation
root). If the value of this property is non-null and the
VALIDATION_SCHEMA_ROOT_ELEMENT_DECLARATION
property is not set the
validation root will not be validated against any element declaration. If the
value is a QName
and a type definition cannot be
found an error will be reported.
Type: QName
or
org.apache.xerces.xs.XSTypeDefinition
Note: If the VALIDATION_SCHEMA_ROOT_ELEMENT_DECLARATION
property has
been set this property is ignored.
If the value specified is an XSTypeDefinition
it must be an object
obtained from Xerces and must also be an object which is known to the schema
validator, for example one which would be returned from an
XMLGrammarPool
. If these constraints are not met a
ClassCastException
may be thrown or processing of substitution
groups, xsi:type
and wildcards may fail to locate otherwise available
schema components.
Prior to Xerces-J 2.10.0 setting the value of this property to an
XSTypeDefinition
was not supported.
VALIDATION_SCHEMA_ROOT_ELEMENT_DECLARATION
public static final XmlReadingWritableProperty<Integer> INPUT_BUFFER_SIZE
Some tests indicate that a bigger buffer size can improve the parsing performance for relatively large files. The default buffer size in Xerces is 2K. This would give a good performance for small documents (less than 10K). For documents larger than 10K, specifying the buffer size to 4K or 8K will significantly improve the performance. But it's not recommended to set it to a value larger than 16K. For really tiny documents (1K, for example), you can also set it to a value less than 2K, to get the best performance.
There are some conditions where the size of the parser's internal buffers may be increased beyond the size specified for the input buffer. This would happen in places where the text in the document cannot be split, for instance if the document contains a name which is longer than the input buffer.
public static final XmlReadingWritableProperty<Locale> LOCALE
null
the platform default returned from
Locale.getDefault()
will be used.
If no messages are available for the specified locale the platform default will be used. If the platform default is not English and no messages are available for this locale then messages will be reported in English.
public static final XmlReadingWritableProperty<Object> SECURITY_MANAGER
Type: org.apache.xerces.util.SecurityManager
Note: The SecurityManager
class contains a number of methods that
allow applications to tailor Xerces's tolerance of document constructs that
could result in the heavy consumption of system resources (see the JavaDoc of
this class for details). Default values that should be appropriate for many
environments are provided when the class is instantiated. Xerces will not
behave in a strictly specification compliant way when this property is set.
By default, this property is not set; Xerces's behaviour is therefore
strictly specification compliant by default.
Copyright © 2025. All rights reserved.