Advanced Saxon HE/PE/EE XQuery Transformation Options
The XQuery transformation scenario allows you to configure advanced options that are specific for the Saxon HE (Home Edition), PE (Professional Edition), and EE (Enterprise Edition) engines.
Saxon-HE/PE/EE Options
The advanced options for Saxon 12.3 Home Edition (HE),
Professional Edition (PE), and Enterprise Edition (EE) are as follows:
- Use a configuration file ("-config")
- Sets a Saxon 12.3 configuration file that is used for XQuery transformation and validation scenarios.
- Enable Optimizations ("-opt")
- This option is selected by default, which means that optimization is enabled. If not selected, the optimization is suppressed, which is helpful when reducing the compiling time is important, optimization conflicts with debugging, or optimization causes extension functions with side-effects to behave unpredictably.
- Use linked tree model ("-tree:linked")
- This option activates the linked tree model.
- Strip whitespaces ("-strip")
- Specifies how the strip whitespaces operation is handled. You can choose one of
the following values:
- All ("all") - Strips all whitespace text nodes from
source documents before any further processing, regardless of any
@xml:space
attributes in the source document. - Ignore ("ignorable") - Strips all ignorable
whitespace text nodes from source documents before any further processing,
regardless of any
@xml:space
attributes in the source document. Whitespace text nodes are ignorable if they appear in elements defined in the DTD or schema as having element-only content. - None ("none") - Strips no whitespace before further processing.
- All ("all") - Strips all whitespace text nodes from
source documents before any further processing, regardless of any
- Enable profiling ("-TP")
- If selected, profiling of the execution time in a query is enabled. The corresponding
text field is used to specify the path to the output file where the profiling
information will be saved. As long as the option is selected, and the output file
specified, it will gather timed tracing information and create a profile report to the
specified file.Note: The profiling support works only if the Present as a sequence transformation option is not set.
Saxon-PE/EE Options
The following advanced options are specific for Saxon 12.3
Professional Edition (PE) and Enterprise Edition (EE) only:
- Allow calls on extension functions ("-ext")
- If selected, calls on external functions are allowed. Selecting this option is not recommended in an environment where untrusted stylesheets may be executed. It also disables user-defined extension elements and the writing of multiple output files, both of which carry similar security risks.
Saxon-EE Options
The advanced options that are specific for Saxon 12.3
Enterprise Edition (EE) are as follows:
- Validation of the source file ("-val")
- Requests schema-based validation of the source file and of any files read using
document()
or similar functions. It can have the following values:- Schema validation ("strict") - This mode requires an XML Schema and allows for parsing the source documents with strict schema-validation enabled.
- Lax schema validation ("lax") - If an XML Schema is provided, this mode allows for parsing the source documents with schema-validation enabled but the validation will not fail if, for example, element declarations are not found.
- Disable schema validation - This specifies that the source documents should be parsed with schema-validation disabled.
- Validation errors in the result tree treated as warnings ("-outval")
-
Normally, if validation of result documents is requested, a validation error is fatal. Selecting this option causes such validation failures to be treated as warnings.
- Write comments for non-fatal validation errors of the result document
- The validation messages for non-fatal errors are written (wherever possible) as a comment in the result document itself.
- Enable XQuery update ("-update:(on|off)")
-
This option controls whether or not XQuery update syntax is accepted. The default value is off.
- Backup files updated by XQuery ("-backup:(on|off)")
- If selected, backup versions for any XML files updated with an XQuery Update are generated. This option is available when the Enable XQuery update option is selected.
Other Options
- Initializer class
- Equivalent to the
-init
Saxon command-line argument. The value is the name of a user-supplied class that implements the net.sf.saxon.lib.Initializer interface. This initializer is called during the initialization process, and may be used to set any options required on the configuration programmatically. It is particularly useful for tasks such as registering extension functions, collations, or external object models, especially in Saxon-HE where the option cannot be set via a configuration file. Saxon only calls the initializer when running from the command line, but the same code may be invoked to perform initialization when running user application code.