public interface LoadOptions
The options supported by DocumentLoader
are also supported
by LoadDocument
.
Modifier and Type | Field and Description |
---|---|
static int |
ADD_ANY_DOCUMENT_TYPE
If loaded document has no
DocumentType ,
add its property
Constants.DOCUMENT_TYPE_PROPERTY
with an instance of
AnyDocumentType ,
a dummy DocumentType, as a value. |
static int |
ADD_AUTO_DOCUMENT_TYPE
If loaded document has no
DocumentType ,
add its property
Constants.DOCUMENT_TYPE_PROPERTY
with an instance of
AutoDocumentType ,
a semi-dummy DocumentType, as a value. |
static int |
ADD_DECLARED_PREFIXES
Add property
Constants.DECLARED_PREFIXES_PROPERTY
to loaded elements. |
static int |
ADD_LINE_COLUMN
Add property
Constants.LINE_COLUMN_PROPERTY
to loaded elements. |
static int |
ADD_XML_DECLARATION
Add property
Constants.XML_DECLARATION_PROPERTY
to loaded document. |
static int |
DONT_INCLUDE
Do no expand inclusions found in loaded document.
|
static int |
DONT_STRIP_WHITESPACE
Do not strip ignoreable whitespace.
|
static int |
GUESS_IGNORABLE_WHITESPACE
Guess which whitespace is ignoreable and strip it.
|
static int |
XINCLUDE
Mark loaded document as being XInclude-aware.
|
static final int ADD_DECLARED_PREFIXES
Constants.DECLARED_PREFIXES_PROPERTY
to loaded elements.
Setting this option prevents DocumentLoader from adding
property
Constants.NAMESPACE_PREFIX_MAP_PROPERTY
,
which is its default behavior.
Option of DocumentLoader
.
static final int ADD_LINE_COLUMN
Constants.LINE_COLUMN_PROPERTY
to loaded elements.
Option of DocumentLoader
.
static final int ADD_XML_DECLARATION
Constants.XML_DECLARATION_PROPERTY
to loaded document.
Option of DocumentLoader
.
static final int ADD_ANY_DOCUMENT_TYPE
DocumentType
,
add its property
Constants.DOCUMENT_TYPE_PROPERTY
with an instance of
AnyDocumentType
,
a dummy DocumentType, as a value.
Option of LoadDocument
.
static final int ADD_AUTO_DOCUMENT_TYPE
DocumentType
,
add its property
Constants.DOCUMENT_TYPE_PROPERTY
with an instance of
AutoDocumentType
,
a semi-dummy DocumentType, as a value.
Option of LoadDocument
.
static final int DONT_STRIP_WHITESPACE
By default, ignoreable whitespace is automatically stripped if
loaded document has an actual DocumentType or if loaded document
has no DocumentType or has a dummy DocumentType, but the
GUESS_IGNORABLE_WHITESPACE
has been specified.
Option of LoadDocument
.
static final int GUESS_IGNORABLE_WHITESPACE
This option is ignored unless loaded document has no DocumentType or a dummy DocumentType has been added to loaded document.
Option of LoadDocument
.
static final int DONT_INCLUDE
By default, inclusions (e.g. <xi:include>) are replaced by the set of nodes they specify.
Note that references to internal or external entities are always expanded.
Option of LoadDocument
.
static final int XINCLUDE
Option of LoadDocument
.
Ignored if the DocumentTypeDetector
detects some
XInclusionScheme
s. That is, the DocumentTypeDetector
has priority over this option.
This option is orthogonal to option DONT_INCLUDE
.
This allows not only to process XIncludes at load time, but also
to process them after that, on demand.