com.ctc.wstx.api
Class WstxInputProperties

java.lang.Object
  extended by com.ctc.wstx.api.WstxInputProperties

public final class WstxInputProperties
extends java.lang.Object

Class that contains constant for property names used to configure cursor and event readers produced by Wstx implementation of XMLInputFactory.

TODO: - CHECK_CHAR_VALIDITY (separate for white spaces?) - CATALOG_RESOLVER? (or at least, ENABLE_CATALOGS)


Nested Class Summary
static class WstxInputProperties.ParsingMode
          Inner class used for creating type-safe enumerations (prior to JDK 1.5).
 
Field Summary
static java.lang.String P_BASE_URL
          Property of type URL, that will allow specifying context URL to use when resolving relative references, for the main-level entities (external DTD subset, references from the internal DTD subset).
static java.lang.String P_CACHE_DTDS
          Whether readers will try to cache parsed external DTD subsets or not.
static java.lang.String P_CACHE_DTDS_BY_PUBLIC_ID
          Whether reader is to cache DTDs (when caching enabled) based on public id or not: if not, system id will be primarily used.
static java.lang.String P_CUSTOM_INTERNAL_ENTITIES
          Deprecated. This feature may be remove from future versions of Woodstox, since the same functionality can be achieved by using custom entity resolvers.

Property of type Map, that defines explicit set of internal (generic) entities that will define of override any entities defined in internal or external subsets; except for the 5 pre-defined entities (lt, gt, amp, apos, quot). Can be used to explicitly define entites that would normally come from a DTD.

static java.lang.String P_DTD_RESOLVER
          Property of type XMLResolver, that will allow overriding of default DTD and external parameter entity resolution.
static java.lang.String P_ENTITY_RESOLVER
          Property of type XMLResolver, that will allow overriding of default external general entity resolution.
static java.lang.String P_INPUT_BUFFER_LENGTH
          Size of input buffer (in chars), to use for reading XML content from input stream/reader.
static java.lang.String P_INPUT_PARSING_MODE
          Three-valued property (one of PARSING_MODE_DOCUMENT, PARSING_MODE_FRAGMENT or PARSING_MODE_DOCUMENTS; default being the document mode) that can be used to handle "non-standard" XML content.
static java.lang.String P_LAZY_PARSING
           
static java.lang.String P_MIN_TEXT_SEGMENT
          Property to specify shortest non-complete text segment (part of CDATA section or text content) that parser is allowed to return, if not required to coalesce text.
static java.lang.String P_NORMALIZE_ATTR_VALUES
          Deprecated. In future versions of Woodstox, normalization will not be optional, and the default setting (true) will be the only supported way.

Whether white space in attribute values should be normalized as specified by XML specs or not.

Turning this option may help performance if attributes generally have non-normalized white space; otherwise effect is negligible.

static java.lang.String P_NORMALIZE_LFS
          Deprecated. In future versions of Woodstox, normalization will not be optional, and the default setting (true) will be the only supported way.

Whether non-standard linefeeds (\r, \r\n) need to be converted to standard ones (\n) or not, as per XML specs.

Turning this option off may help performance when processing content that has non-standard linefeeds (Mac, Windows); otherwise effect is negligible.

static java.lang.String P_SUPPORT_DTDPP
          Whether the Reader will recognized DTD++ extensions when parsing DTD subsets.
static java.lang.String P_UNDECLARED_ENTITY_RESOLVER
          Property of type XMLResolver, that will allow graceful handling of references to undeclared (general) entities.
static java.lang.String P_VALIDATE_TEXT_CHARS
          Whether readers will verify that characters in text content are fully valid XML characters (not just Unicode).
static WstxInputProperties.ParsingMode PARSING_MODE_DOCUMENT
           
static WstxInputProperties.ParsingMode PARSING_MODE_DOCUMENTS
           
static WstxInputProperties.ParsingMode PARSING_MODE_FRAGMENT
           
static java.lang.String UNKNOWN_ATTR_TYPE
          Constants used when no DTD handling is done, and we do not know the 'real' type of an attribute.
 
Constructor Summary
WstxInputProperties()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_ATTR_TYPE

public static final java.lang.String UNKNOWN_ATTR_TYPE
Constants used when no DTD handling is done, and we do not know the 'real' type of an attribute. Seems like CDATA is the safe choice.

See Also:
Constant Field Values

P_NORMALIZE_LFS

public static final java.lang.String P_NORMALIZE_LFS
Deprecated. In future versions of Woodstox, normalization will not be optional, and the default setting (true) will be the only supported way.

Whether non-standard linefeeds (\r, \r\n) need to be converted to standard ones (\n) or not, as per XML specs.

Turning this option off may help performance when processing content that has non-standard linefeeds (Mac, Windows); otherwise effect is negligible.

See Also:
Constant Field Values

P_NORMALIZE_ATTR_VALUES

public static final java.lang.String P_NORMALIZE_ATTR_VALUES
Deprecated. In future versions of Woodstox, normalization will not be optional, and the default setting (true) will be the only supported way.

Whether white space in attribute values should be normalized as specified by XML specs or not.

Turning this option may help performance if attributes generally have non-normalized white space; otherwise effect is negligible.

See Also:
Constant Field Values

P_VALIDATE_TEXT_CHARS

public static final java.lang.String P_VALIDATE_TEXT_CHARS
Whether readers will verify that characters in text content are fully valid XML characters (not just Unicode). If true, will check that they are valid (including white space); if false, will not check.

Turning this option off may improve parsing performance; leaving it on guarantees compatibility with XML 1.0 specs regarding character validity rules.

See Also:
Constant Field Values

P_CACHE_DTDS

public static final java.lang.String P_CACHE_DTDS
Whether readers will try to cache parsed external DTD subsets or not.

See Also:
Constant Field Values

P_CACHE_DTDS_BY_PUBLIC_ID

public static final java.lang.String P_CACHE_DTDS_BY_PUBLIC_ID
Whether reader is to cache DTDs (when caching enabled) based on public id or not: if not, system id will be primarily used. Although theoretically public IDs should be unique, and should be good caching keys, sometimes broken documents use 'wrong' public IDs, and such by default caching keys are based on system id only.

See Also:
Constant Field Values

P_LAZY_PARSING

public static final java.lang.String P_LAZY_PARSING
See Also:
Constant Field Values

P_SUPPORT_DTDPP

public static final java.lang.String P_SUPPORT_DTDPP
Whether the Reader will recognized DTD++ extensions when parsing DTD subsets.

Note: not implemented as of 2.0.x

See Also:
Constant Field Values

P_INPUT_BUFFER_LENGTH

public static final java.lang.String P_INPUT_BUFFER_LENGTH
Size of input buffer (in chars), to use for reading XML content from input stream/reader.

See Also:
Constant Field Values

P_MIN_TEXT_SEGMENT

public static final java.lang.String P_MIN_TEXT_SEGMENT
Property to specify shortest non-complete text segment (part of CDATA section or text content) that parser is allowed to return, if not required to coalesce text.

See Also:
Constant Field Values

P_CUSTOM_INTERNAL_ENTITIES

public static final java.lang.String P_CUSTOM_INTERNAL_ENTITIES
Deprecated. This feature may be remove from future versions of Woodstox, since the same functionality can be achieved by using custom entity resolvers.

Property of type Map, that defines explicit set of internal (generic) entities that will define of override any entities defined in internal or external subsets; except for the 5 pre-defined entities (lt, gt, amp, apos, quot). Can be used to explicitly define entites that would normally come from a DTD.

See Also:
Constant Field Values

P_DTD_RESOLVER

public static final java.lang.String P_DTD_RESOLVER
Property of type XMLResolver, that will allow overriding of default DTD and external parameter entity resolution.

See Also:
Constant Field Values

P_ENTITY_RESOLVER

public static final java.lang.String P_ENTITY_RESOLVER
Property of type XMLResolver, that will allow overriding of default external general entity resolution. Note that using this property overrides settings done using XMLInputFactory.RESOLVER (and vice versa).

See Also:
Constant Field Values

P_UNDECLARED_ENTITY_RESOLVER

public static final java.lang.String P_UNDECLARED_ENTITY_RESOLVER
Property of type XMLResolver, that will allow graceful handling of references to undeclared (general) entities.

See Also:
Constant Field Values

P_BASE_URL

public static final java.lang.String P_BASE_URL
Property of type URL, that will allow specifying context URL to use when resolving relative references, for the main-level entities (external DTD subset, references from the internal DTD subset).

See Also:
Constant Field Values

P_INPUT_PARSING_MODE

public static final java.lang.String P_INPUT_PARSING_MODE
Three-valued property (one of PARSING_MODE_DOCUMENT, PARSING_MODE_FRAGMENT or PARSING_MODE_DOCUMENTS; default being the document mode) that can be used to handle "non-standard" XML content. The default mode (PARSING_MODE_DOCUMENT) allows parsing of only well-formed XML documents, but the other two modes allow more lenient parsing. Fragment mode allows parsing of XML content that does not have a single root element (can have zero or more), nor can have XML or DOCTYPE declarations: this may be useful if parsing a subset of a full XML document. Multi-document (PARSING_MODE_DOCUMENTS) mode on the other hand allows parsing of a stream that contains multiple consequtive well-formed documents, with possibly multiple XML and DOCTYPE declarations.

The main difference from the API perspective is that in first two modes, START_DOCUMENT and END_DOCUMENT are used as usual (as the first and last events returned), whereas the multi-document mode can return multiple pairs of these events: although it is still true that the first event (one cursor points to when reader is instantiated or returned by the event reader), there may be intervening pairs that signal boundary between two adjacent enclosed documents.

See Also:
Constant Field Values

PARSING_MODE_DOCUMENT

public static final WstxInputProperties.ParsingMode PARSING_MODE_DOCUMENT

PARSING_MODE_FRAGMENT

public static final WstxInputProperties.ParsingMode PARSING_MODE_FRAGMENT

PARSING_MODE_DOCUMENTS

public static final WstxInputProperties.ParsingMode PARSING_MODE_DOCUMENTS
Constructor Detail

WstxInputProperties

public WstxInputProperties()