Top Description Fields
org.codehaus.stax2

public Interface XMLStreamProperties

Known Direct Implementers
org.codehaus.stax2.XMLInputFactory2, org.codehaus.stax2.XMLOutputFactory2

This interface defines configuration properties shared by multiple kinds of factories (input, output, validation) or instances produces (readers, writers, validators).

Some of the properties here are same as ones earlier defined in javax.xml.stream.XMLInputFactory and javax.xml.stream.XMLOutputFactory, and are redeclared here to emphasize the fact they are usable with broader context (esp. properties that use to be only used with input factories but can now be used with output or validation factories).

Field Summary

Modifier and TypeField and Description
public static final String
XSP_IMPLEMENTATION_NAME

This read-only property returns name of the implementation.

public static final String
XSP_IMPLEMENTATION_VERSION

This read-only property returns the version of the implementation, and is to be used with implementation name (XSP_IMPLEMENTATION_NAME) property.

public static final String
XSP_NAMESPACE_AWARE

Property that can be set to indicate that namespace information is to be handled in conformance to the xml namespaces specifiation; or false to indicate no namespace handling should be done.

public static final String
XSP_PROBLEM_REPORTER

Property that can be set to specify a problem handler which will get notified of non-fatal problem (validation errors in non-validating mode, warnings).

public static final String
XSP_SUPPORT_XMLID

Read/write property that can be set to change the level of xml:id specification support, if the implementation implements xml:id specification.

public static final String
XSP_SUPPORTS_XML11

This read-only property indicates whether the implementation supports xml 1.1 content; Boolean.TRUE indicates it does, Boolean.FALSE that it does not.

public static final String
XSP_V_XMLID_FULL

Property value to use with property XSP_SUPPORT_XMLID.

public static final String
XSP_V_XMLID_NONE

Property value to use with property XSP_SUPPORT_XMLID.

public static final String
XSP_V_XMLID_TYPING

Property value to use with property XSP_SUPPORT_XMLID.

Field Detail

XSP_IMPLEMENTATION_NAMEback to summary
public static final String XSP_IMPLEMENTATION_NAME

This read-only property returns name of the implementation. It can be used to determine implementation-specific feature sets, in case other methods (calling isPropertySupported) does not work adequately.

XSP_IMPLEMENTATION_VERSIONback to summary
public static final String XSP_IMPLEMENTATION_VERSION

This read-only property returns the version of the implementation, and is to be used with implementation name (XSP_IMPLEMENTATION_NAME) property.

XSP_NAMESPACE_AWAREback to summary
public static final String XSP_NAMESPACE_AWARE

Property that can be set to indicate that namespace information is to be handled in conformance to the xml namespaces specifiation; or false to indicate no namespace handling should be done.

XSP_PROBLEM_REPORTERback to summary
public static final String XSP_PROBLEM_REPORTER

Property that can be set to specify a problem handler which will get notified of non-fatal problem (validation errors in non-validating mode, warnings). Its value has to be of type javax.xml.stream.XMLReporter

XSP_SUPPORT_XMLIDback to summary
public static final String XSP_SUPPORT_XMLID

Read/write property that can be set to change the level of xml:id specification support, if the implementation implements xml:id specification. Value to set should be one of XSP_V_XMLID_xxx constants (like XSP_V_XMLID_TYPING).

Default value is implementation-specific, but recommended default value is XSP_V_XMLID_TYPING for implementations that do support Xml:id specification: those that do not, have to default to XSP_V_XMLID_NONE. For Xml:id-enabled implementations, typing support is the most logical default, since it provides the intuitive behavior of xml:id functionality, as well as reasonable performance (very little overhead in non-validating mode; usual id checking overhead for validating mode).

XSP_SUPPORTS_XML11back to summary
public static final String XSP_SUPPORTS_XML11

This read-only property indicates whether the implementation supports xml 1.1 content; Boolean.TRUE indicates it does, Boolean.FALSE that it does not.

XSP_V_XMLID_FULLback to summary
public static final String XSP_V_XMLID_FULL

Property value to use with property XSP_SUPPORT_XMLID. Value indicates that both the attribute type assignment portion and the validation portion of xml:id should be supported. This validation is independent of the actual schema (DTD, RNG, W3C Schema) validation, in the sense that even if no such validation is enabled, xml:id value validation will still be done if this property value is used. Conversely, if schema-based validation is used, both xml:id and schema validation may be done (although schema validator instances may choose to ignore validity checks if they know that full xml:id support is enabled).

XSP_V_XMLID_NONEback to summary
public static final String XSP_V_XMLID_NONE

Property value to use with property XSP_SUPPORT_XMLID. Property value that indicates that no xml:id support should be enabled.

XSP_V_XMLID_TYPINGback to summary
public static final String XSP_V_XMLID_TYPING

Property value to use with property XSP_SUPPORT_XMLID. Value indicates that the attribute type assignment portion of xml:id should be supported (all 'xml:id' attributes that are not explicitly declared should have attribute type of ID), but that no xml:id specific validation is to be done. Due to typing, value normalization should occur. It is still possible that schema (DTD, RNG, W3C Schema) based validation is done, including validation of values of xml:id attributes, but only based on Schema information.

The main reason for specifying this value (as opposed to the full enabling) is that there is some overhead associated with validation (especially uniqueness constraints checking, which means that all values of xml:id attributes in the input document have to be kept in memory), whereas typing is a low overhead operation.