FeatureKeys defines a set of constants, names of Saxon configuration
options which can be supplied to the Saxon implementations of the JAXP
interfaces TransformerFactory, SchemaFactory, Validator, and ValidationHandler.
ALLOW_EXTERNAL_FUNCTIONS
public static final String ALLOW_EXTERNAL_FUNCTIONS
ALLOW_EXTERNAL_FUNCTIONS must be a Boolean; it determines whether calls to external functions are allowed.
More specifically, it disallows all of the following:
- Calls to Java extension functions
- Use of the XSLT system-property() function to access Java system properties
- Use of a relative URI in the
xsl:result-document
instruction - Calls to XSLT extension instructions
Note that this option does not disable use of the
doc()
function or similar
functions to access the filestore of the machine where the transformation or query is running.
That should be done using a user-supplied
URIResolver
COLLATION_URI_RESOLVER
public static final String COLLATION_URI_RESOLVER
COLLATION_URI_RESOLVER must be a
CollationURIResolver
.
This resolver will be used to resolve collation URIs used in stylesheets compiled or executed under the
control of this TransformerFactory
COLLECTION_URI_RESOLVER
public static final String COLLECTION_URI_RESOLVER
COLLECTION_URI_RESOLVER must be a
CollectionURIResolver
.
This resolver will be used to resolve collection URIs used in calls of the collection() function
COMPILE_WITH_TRACING
public static final String COMPILE_WITH_TRACING
COMPILE_WITH_TRACING must be a Boolean. If true, stylesheets and queries
are compiled with tracing enabled, but the choice of a trace listener
is deferred until run time (see
Controller.addTraceListener(TraceListener)
)
CONFIGURATION
public static final String CONFIGURATION
CONFIGURATION must be an instance of
Configuration
. This attribute cannot be set on the
Configuration itself, but it can be set on various JAXP factory objects such as a
TransformerFactory or DocumentBuilderFactory, to ensure that several such factories use the same
configuration. Note that other configuration options are held in the Configuration object, so setting
this attribute will cancel all others that have been set. Also, if two factories share the same
configuration, then setting an attribute on one affects all the others.
DTD_VALIDATION
public static final String DTD_VALIDATION
DTD_VALIDATION must be a Boolean. This determines whether source documents should be
parsed with DTD-validation enabled.
EXPAND_ATTRIBUTE_DEFAULTS
public static final String EXPAND_ATTRIBUTE_DEFAULTS
EXPAND_ATTRIBUTE_DEFAULTS must be a Boolean; it determines whether fixed and default values defined
in a schema or DTD will be expanded. By default (and for conformance with the
specification) validation against a DTD or schema will cause default values defined in the schema
or DTD to be inserted into the document. Setting this feature to false suppresses this behaviour. In
the case of DTD-defined defaults this only works if the XML parser reports whether each attribute was
specified in the source or generated by expanding a default value. Not all XML parsers report this
information.
LINE_NUMBERING
public static final String LINE_NUMBERING
LINE_NUMBERING must be a Boolean; it determines whether line numbers are maintained for the
source document
MESSAGE_EMITTER_CLASS
public static final String MESSAGE_EMITTER_CLASS
MESSAGE_EMITTER_CLASS must be the class name of a class that implements net.sf.saxon.event.Receiver.
Despite the name, it is not required to be an instance of net.sf.saxon.event.Emitter
MODULE_URI_RESOLVER
public static final String MODULE_URI_RESOLVER
MODULE_URI_RESOLVER must be an instance of
ModuleURIResolver
. This is a user-written
class that takes responsibility for locating XQuery modules.
NAME_POOL
public static final String NAME_POOL
NAME_POOL must be an instance of net.sf.saxon.om.NamePool
OUTPUT_URI_RESOLVER
public static final String OUTPUT_URI_RESOLVER
OUTPUT_URI_RESOLVER must be an instance of
OutputURIResolver
. This is a
user-written class that takes responsibility for disposing of the result trees produced
using XSLT xsl:result-document instruction
PRE_EVALUATE_DOC_FUNCTION
public static final String PRE_EVALUATE_DOC_FUNCTION
PRE_EVALUATE_DOC_FUNCTION is a boolean. If set, calls to the doc() or document() function with a statically-known
document URI are evaluated at compile time, so that the document only needs to be parsed and constructed once.
The effect of this is that subsequent changes to the contents of the file will not be reflected during
query or stylesheet processing
RECOGNIZE_URI_QUERY_PARAMETERS
public static final String RECOGNIZE_URI_QUERY_PARAMETERS
RECOGNIZE_URI_QUERY_PARAMETERS must be a Boolean; it determines whether query parameters (things after a question mark)
in a URI passed to the document() or doc() function are specially recognized by the system default URIResolver.
Allowed parameters include, for example validation=strict to perform schema validation, and strip-space=yes
to perform stripping of all whitespace-only text nodes.
RECOVERY_POLICY
public static final String RECOVERY_POLICY
SCHEMA_URI_RESOLVER
public static final String SCHEMA_URI_RESOLVER
SCHEMA_URI_RESOLVER must be an instance of
SchemaURIResolver
. This is a user-written
class that takes responsibility for locating schema documents.
SCHEMA_VALIDATION
public static final String SCHEMA_VALIDATION
SOURCE_PARSER_CLASS
public static final String SOURCE_PARSER_CLASS
SOURCE_PARSER_CLASS must be the full class name of an XMLReader. This identifies the parser
used for source documents.
STRIP_WHITESPACE
public static final String STRIP_WHITESPACE
STRIP_WHITESPACE must be a string set to one of the values "all", "none", or "ignorable".
This determines what whitespace is stripped during tree construction: "all" removes all
whitespace-only text nodes; "ignorable" removes whitespace text nodes in element-only content
(as identified by a DTD or Schema), and "none" preserves all whitespace. This whitespace stripping
is additional to any stripping caused by the xsl:strip-space declaration in a stylesheet.
STYLE_PARSER_CLASS
public static final String STYLE_PARSER_CLASS
STYLE_PARSER_CLASS must be an XMLReader. This identifies the parser used for stylesheets and
schema modules.
TIMING
public static final String TIMING
TIMING must be an Boolean; it determines whether basic timing information is output to System.err
(This attribute is a bit of a misnomer; it outputs timing information when used from the command line,
but also basic tracing information when used from the Java API: for example, names of output files
written using xsl:result-document, and names of classes dynamically loaded)
TRACE_EXTERNAL_FUNCTIONS
public static final String TRACE_EXTERNAL_FUNCTIONS
TRACE_EXTERNAL_FUNCTIONS must be a Boolean; it determines whether the loading and binding of extension
functions is traced
TRACE_LISTENER
public static final String TRACE_LISTENER
TRACE_OPTIMIZER_DECISIONS
public static final String TRACE_OPTIMIZER_DECISIONS
TRACE_OPTIMIZER_DECISIONS must be a Boolean; it determines whether decisions made by the optimizer
are traced
TREE_MODEL
public static final String TREE_MODEL
USE_PI_DISABLE_OUTPUT_ESCAPING
public static final String USE_PI_DISABLE_OUTPUT_ESCAPING
USE_PI_DISABLE_OUTPUT_ESCAPING must be a Boolean. This determines a TransformerHandler created
with this Factory or Configuration recognizes the processing instructions
Result.PI_DISABLE_OUTPUT_ESCAPING
and Result.PI_ENABLE_OUTPUT_ESCAPING
in the input stream as instructions to disable or to re-enable output escaping.\
VALIDATION_WARNINGS
public static final String VALIDATION_WARNINGS
VALIDATION_WARNINGS must be a Boolean. This determines whether validation errors in result
documents should be treated as fatal. By default they are fatal; with this option set, they
are treated as warnings.
VERSION_WARNING
public static final String VERSION_WARNING
VERSION_WARNING must be a Boolean. This determines whether a warning should be output when
running an XSLT 2.0 processor against an XSLT 1.0 stylesheet. The XSLT specification requires
this to be done by default.
XINCLUDE
public static final String XINCLUDE
XINCLUDE must be a Boolean. This determines whether XInclude processing should be performed by default
when XML source documents (including stylesheets and schemas) are read.
XML_VERSION
public static final String XML_VERSION
XML_VERSION is a character string. This determines the XML version used by the Configuration: the
value must be "1.0" or "1.1". For details, see
Configuration.setXMLVersion(int)
.
Note that source documents specifying xml version="1.0" or "1.1" are accepted
regardless of this setting. The effect of this switch is to change the validation
rules for types such as Name and NCName, to change the meaning of \i and \c in
regular expressions, and to determine whether the serializer allows XML 1.1 documents
to be constructed.