Class StaticQueryContext
- Direct Known Subclasses:
- StaticQueryContextPE
Despite its name, StaticQueryContext no longer implements the StaticContext
 interface, which means it cannot be used directly by Saxon when parsing a query. Instead it is first copied
 to create a QueryModule object, which does implement the StaticContext interface.
The application constructs a StaticQueryContext and initializes it with information about the context, for example, default namespaces, base URI, and so on. When a query is compiled using this StaticQueryContext, the query parser makes a copy of the StaticQueryContext and uses this internally, modifying it with information obtained from the query prolog, as well as information such as namespace and variable declarations that can occur at any point in the query. The query parser does not modify the original StaticQueryContext supplied by the calling application, which may therefore be used for compiling multiple queries, serially or even in multiple threads.
This class forms part of Saxon's published XQuery API. Methods that are considered stable are labelled with the JavaDoc "since" tag. The value 8.4 indicates a method introduced at or before Saxon 8.4; other values indicate the version at which the method was introduced.
In the longer term, this entire API may at some stage be superseded by a proposed standard Java API for XQuery.
- Since:
- 8.4
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedPrivate constructor used when copying a contextStaticQueryContext(Configuration config) Create a StaticQueryContext using a given Configuration.StaticQueryContext(Configuration config, boolean initialize) Create a StaticQueryContext using a given Configuration.Create a copy of a supplied StaticQueryContext
- 
Method SummaryModifier and TypeMethodDescriptionvoidClear all declared global variablesvoidClear all the user-declared namespacesvoidcompileLibrary(InputStream source, String encoding) Prepare an XQuery library module for subsequent evaluation.voidcompileLibrary(Reader source) Prepare an XQuery library module for subsequent evaluation.voidcompileLibrary(String query) Compile an XQuery library module for subsequent evaluation.compileQuery(InputStream source, String encoding) Prepare an XQuery query for subsequent evaluation.compileQuery(Reader source) Prepare an XQuery query for subsequent evaluation.compileQuery(String query) Prepare an XQuery query for subsequent evaluation.voidCopy details from another StaticQueryContextvoidSet the default collation.voiddeclareGlobalVariable(StructuredQName qName, SequenceType type, GroundedValue value, boolean external) Declare a global variable.voiddeclareNamespace(String prefix, NamespaceUri uri) Declare a namespace whose prefix can be used in expressions.Get the Base URI of the query, for resolving any relative URI's used in the expression.Get any CodeInjector that has been registeredgetCompiledLibrary(NamespaceUri namespace) Get a previously compiled library moduleGet the Configuration optionsintGet the current construction modeGet the name of the default collation.Get the default namespace for elements and typesGet the default function namespaceDeprecated.Get the error reporter: that is, a used-supplied object that is to receive notification of static errors found in the stylesheetGet any extension function library that was previously set.intGet the language versionGet the module location.Get the user-defined ModuleURIResolver for resolving URIs used in "import module" declarations in the XQuery prolog; returns null if none has been explicitly set either on the StaticQueryContext or on the Configuration.Get the NamePool used for compiling expressionsgetNamespaceForPrefix(String prefix) Get the namespace URI for a given prefix, which must have been declared using the methoddeclareNamespace(java.lang.String, net.sf.saxon.om.NamespaceUri).Get the optimizer options being used for compiling queries that use this static context.Get the required type of the context item.Get the system ID of the container of the expression.Get the matching policy for unprefixed element names in axis steps.protected HashMap<String, NamespaceUri> Get the map of user-declared namespacesbooleanAsk whether compile-time generation of trace code was requestedbooleanAsk where an empty sequence should appear in the collation order, if not otherwise specified in the "order by" clausebooleanGet the namespace inheritance modebooleanAsk whether the policy for boundary space is "preserve" or "strip"booleanGet the namespace copy modebooleanAsk whether this query is schema-awarebooleanAsk whether the streaming option has been set, that is, whether subsequent calls on compile() will compile queries to be capable of executing in streaming mode.booleanAsk whether XQuery Update is allowedbooleanAsk whether the query is allowed to be updatingIterator over all the declared global variablesGet the namespace prefixes that have been declared using the methoddeclareNamespace(java.lang.String, net.sf.saxon.om.NamespaceUri)Get the executable containing this queryvoidreset()Reset the state of this StaticQueryContext to an uninitialized statevoidsetBaseURI(String baseURI) Set the Base URI of the queryvoidsetCodeInjector(CodeInjector injector) Request that the parser should insert custom code into the expression tree by calling a supplied CodeInjector to process each expression as it is parsed, for example for tracing or performance measurementvoidsetCompileWithTracing(boolean trace) Request compile-time generation of trace code (or not)voidsetConfiguration(Configuration config) Set the Configuration optionsvoidsetConstructionMode(int mode) Set the construction mode for this modulevoidSet the default element namespacevoidsetDefaultFunctionNamespace(NamespaceUri defaultFunctionNamespace) Set the default function namespacevoidsetEmptyLeast(boolean least) Set the option for where an empty sequence appears in the collation order, if not otherwise specified in the "order by" clausevoidsetErrorListener(ErrorListener listener) Deprecated.since 10.0: usesetErrorReporter(ErrorReporter)voidsetErrorReporter(ErrorReporter reporter) Set an error reporter: that is, a used-supplied object that is to receive notification of static errors found in the stylesheetvoidsetInheritNamespaces(boolean inherit) Set the namespace inheritance modevoidsetLanguageVersion(int version) Set the language version.voidsetModuleLocation(Location location) Set the module location.voidsetModuleURIResolver(ModuleURIResolver resolver) Set a user-defined ModuleURIResolver for resolving URIs used in "import module" declarations in the XQuery prolog.voidsetOptimizerOptions(OptimizerOptions options) Set the optimizer options to be used for compiling queries that use this static context.voidsetPreserveBoundarySpace(boolean preserve) Set the policy for preserving boundary spacevoidsetPreserveNamespaces(boolean inherit) Set the namespace copy modevoidDeclare the static type of the context item.voidsetSchemaAware(boolean aware) Say whether this query is schema-awarevoidsetStreaming(boolean option) Say whether the query should be compiled and evaluated to use streaming.voidsetUnprefixedElementMatchingPolicy(UnprefixedElementMatchingPolicy unprefixedElementMatchingPolicy) Set the matching policy for unprefixed element names in axis steps.voidsetUpdatingEnabled(boolean updating) Say whether the query is allowed to be updating.
- 
Constructor Details- 
StaticQueryContextprotected StaticQueryContext()Private constructor used when copying a context
- 
StaticQueryContextCreate a StaticQueryContext using a given Configuration. This creates a StaticQueryContext for a main module (that is, a module that is not a library module). The static query context is initialized from the default static query context held in the configuration.- Parameters:
- config- the Saxon Configuration
- Since:
- 8.4
 
- 
StaticQueryContextCreate a StaticQueryContext using a given Configuration. This creates a StaticQueryContext for a main module (that is, a module that is not a library module). The static query context is initialized from the default static query context held in the configuration only if theinitializeargument is set to true.- Parameters:
- config- the Saxon Configuration
- initialize- specifies whether the static context should be initialized using defaults held in the configuration. Setting this to true has the same effect as calling the single-argument constructor. Setting it to false is typically used only when creating the default static query context held by the configuration.
- Since:
- 9.9
 
- 
StaticQueryContextCreate a copy of a supplied StaticQueryContext- Parameters:
- c- the StaticQueryContext to be copied
 
 
- 
- 
Method Details- 
copyFromCopy details from another StaticQueryContext- Parameters:
- c- the other StaticQueryContext
 
- 
resetpublic void reset()Reset the state of this StaticQueryContext to an uninitialized state- Since:
- 8.4
 
- 
setConfigurationSet the Configuration options- Parameters:
- config- the Saxon Configuration
- Throws:
- IllegalArgumentException- if the configuration supplied is different from the existing configuration
- Since:
- 8.4
 
- 
getConfigurationGet the Configuration options- Returns:
- the Saxon configuration
- Since:
- 8.4
 
- 
makeExecutableGet the executable containing this query- Returns:
- the executable (which is newly created by this method)
 
- 
setSchemaAwarepublic void setSchemaAware(boolean aware) Say whether this query is schema-aware- Parameters:
- aware- true if this query is schema-aware
- Since:
- 9.2.1.2
 
- 
isSchemaAwarepublic boolean isSchemaAware()Ask whether this query is schema-aware- Returns:
- true if this query is schema-aware
- Since:
- 9.2.1.2
 
- 
setStreamingpublic void setStreaming(boolean option) Say whether the query should be compiled and evaluated to use streaming. This affects subsequent calls on the compile() methods. This option requires Saxon-EE.- Parameters:
- option- if true, the compiler will attempt to compile a query to be capable of executing in streaming mode. If the query cannot be streamed, a compile-time exception is reported. In streaming mode, the source document is supplied as a stream, and no tree is built in memory. The default is false. Setting the value to true has the side-effect of setting the required context item type to "document node"; this is to ensure that expresions such as //BOOK are streamable.
- Since:
- 9.6
 
- 
isStreamingpublic boolean isStreaming()Ask whether the streaming option has been set, that is, whether subsequent calls on compile() will compile queries to be capable of executing in streaming mode.- Returns:
- true if the streaming option has been set.
- Since:
- 9.6
 
- 
setBaseURISet the Base URI of the query- Parameters:
- baseURI- the base URI of the query, or null to indicate that no base URI is available
- Since:
- 8.4
 
- 
setLanguageVersionpublic void setLanguageVersion(int version) Set the language version.- Parameters:
- version- The XQuery language version. Must be 10 (="1.0") or 30 (="3.0") or 31 (="3.1").
- Since:
- 9.2; changed in 9.3 to expect a DecimalValue rather than a string. Changed in 9.7 to accept an int (30 = "3.0") and to allow "3.1". From 9.8.0.3 the supplied value was ignored and the language version was always set to "3.1". From 11.0 the value 40 was accepted.
 
- 
getLanguageVersionpublic int getLanguageVersion()Get the language version- Returns:
- the language version. Either "1.0" or "1.1". Default is "1.0".
- Since:
- 9.2; changed in 9.3 to return a DecimalValue rather than a string; changed in 9.7 to return an int (30 = "3.0" and so on). Changed in 9.8.0.3 to always return 31. Changed in 11.0 to return 31 or 40.
 
- 
getExtensionFunctionLibraryGet any extension function library that was previously set.- Returns:
- the extension function library, or null if none has been set. The result will always be null if called in Saxon-HE; setting an extension function library requires the Saxon-PE or Saxon-EE versions of this class.
- Since:
- 9.4
 
- 
isCompileWithTracingpublic boolean isCompileWithTracing()Ask whether compile-time generation of trace code was requested- Returns:
- true if compile-time generation of code was requested
- Since:
- 9.0
 
- 
setCompileWithTracingpublic void setCompileWithTracing(boolean trace) Request compile-time generation of trace code (or not)- Parameters:
- trace- true if compile-time generation of trace code is required
- Since:
- 9.0
 
- 
setCodeInjectorRequest that the parser should insert custom code into the expression tree by calling a supplied CodeInjector to process each expression as it is parsed, for example for tracing or performance measurement- Parameters:
- injector- the CodeInjector to be used. May be null, in which case no code is injected
- Since:
- 9.4
 
- 
getCodeInjectorGet any CodeInjector that has been registered- Returns:
- the registered CodeInjector, or null
- Since:
- 9.4
 
- 
isUpdatingpublic boolean isUpdating()Ask whether XQuery Update is allowed- Returns:
- true if XQuery update is supported by queries using this context
 
- 
setInheritNamespacespublic void setInheritNamespaces(boolean inherit) Set the namespace inheritance mode- Parameters:
- inherit- true if namespaces are inherited, false if not
- Since:
- 8.4
 
- 
isInheritNamespacespublic boolean isInheritNamespaces()Get the namespace inheritance mode- Returns:
- true if namespaces are inherited, false if not
- Since:
- 8.4
 
- 
setPreserveNamespacespublic void setPreserveNamespaces(boolean inherit) Set the namespace copy mode- Parameters:
- inherit- true if namespaces are preserved, false if not
- Since:
- 8.4
 
- 
isPreserveNamespacespublic boolean isPreserveNamespaces()Get the namespace copy mode- Returns:
- true if namespaces are preserved, false if not
- Since:
- 8.4
 
- 
setConstructionModepublic void setConstructionMode(int mode) Set the construction mode for this module- Parameters:
- mode- one of- Validation.STRIP,- Validation.PRESERVE
- Since:
- 8.4
 
- 
getConstructionModepublic int getConstructionMode()Get the current construction mode- Returns:
- one of Validation.STRIP,Validation.PRESERVE
- Since:
- 8.4
 
- 
setModuleLocationSet the module location. Normally the module location is assumed to be line 1, column 1 of the resource identified by the base URI. But a different location can be set, for example if the query is embedded in an XML document, and this information will be available in diagnostics.- Parameters:
- location- the module location
- Since:
- 9.7
 
- 
getModuleLocationGet the module location. Normally the module location is assumed to be line 1, column 1 of the resource identified by the base URI. But a different location can be set, for example if the query is embedded in an XML document, and this information will be available in diagnostics.- Returns:
- the module location
- Since:
- 9.7
 
- 
setOptimizerOptionsSet the optimizer options to be used for compiling queries that use this static context. By default the optimizer options set in theConfigurationare used.- Parameters:
- options- the optimizer options to be used
 
- 
getOptimizerOptionsGet the optimizer options being used for compiling queries that use this static context. By default the optimizer options set in theConfigurationare used.- Returns:
- the optimizer options being used
 
- 
compileQueryPrepare an XQuery query for subsequent evaluation. The source text of the query is supplied as a String. The base URI of the query is taken from the static context, and defaults to the current working directory.Note that this interface makes the caller responsible for decoding the query and presenting it as a string of characters. This means it is likely that any encoding specified in the query prolog will be ignored. - Parameters:
- query- The XQuery query to be evaluated, supplied as a string.
- Returns:
- an XQueryExpression object representing the prepared expression
- Throws:
- XPathException- if the syntax of the expression is wrong, or if it references namespaces, variables, or functions that have not been declared, or contains other static errors.
- Since:
- 8.4
 
- 
compileQueryPrepare an XQuery query for subsequent evaluation. The Query is supplied in the form of a Reader. The base URI of the query is taken from the static context, and defaults to the current working directory.Note that this interface makes the Reader responsible for decoding the query and presenting it as a stream of characters. This means it is likely that any encoding specified in the query prolog will be ignored. Also, some implementations of Reader cannot handle a byte order mark. - Parameters:
- source- A Reader giving access to the text of the XQuery query to be compiled.
- Returns:
- an XPathExpression object representing the prepared expression.
- Throws:
- XPathException- if the syntax of the expression is wrong, or if it references namespaces, variables, or functions that have not been declared, or any other static error is reported.
- IOException- if a failure occurs reading the supplied input.
- Since:
- 8.4
 
- 
compileQueryPrepare an XQuery query for subsequent evaluation. The Query is supplied in the form of a InputStream, with an optional encoding. If the encoding is not specified, the query parser attempts to obtain the encoding by inspecting the input stream: it looks specifically for a byte order mark, and for the encoding option in the version declaration of an XQuery prolog. The encoding defaults to UTF-8. The base URI of the query is taken from the static context, and defaults to the current working directory.- Parameters:
- source- An InputStream giving access to the text of the XQuery query to be compiled, as a stream of octets
- encoding- The encoding used to translate characters to octets in the query source. The parameter may be null: in this case the query parser attempts to infer the encoding by inspecting the source, and if that fails, it assumes UTF-8 encoding
- Returns:
- an XPathExpression object representing the prepared expression.
- Throws:
- XPathException- if the syntax of the expression is wrong, or if it references namespaces, variables, or functions that have not been declared, or any other static error is reported.
- Since:
- 8.5
 
- 
compileLibraryCompile an XQuery library module for subsequent evaluation. This method is supported only in Saxon-EE- Parameters:
- query- the content of the module, as a string
- Throws:
- XPathException- if a static error exists in the query
- UnsupportedOperationException- if not using Saxon-EE
- Since:
- 9.2 (changed in 9.3 to return void)
 
- 
compileLibraryPrepare an XQuery library module for subsequent evaluation. This method is supported only in Saxon-EE. The effect of the method is that subsequent query compilations using this static context can import the module URI without specifying a location hint; the import then takes effect without requiring the module to be compiled each time it is imported.- Parameters:
- source- the content of the module, as a Reader which supplies the source code
- Throws:
- XPathException- if a static error exists in the query
- IOException- if the input cannot be read
- UnsupportedOperationException- if not using Saxon-EE
- Since:
- 9.2 (changed in 9.3 to return void)
 
- 
compileLibraryPrepare an XQuery library module for subsequent evaluation. This method is supported only in Saxon-EE. The effect of the method is that subsequent query compilations using this static context can import the module URI without specifying a location hint; the import then takes effect without requiring the module to be compiled each time it is imported.- Parameters:
- source- the content of the module, as an InputStream which supplies the source code
- encoding- the character encoding of the input stream. May be null, in which case the encoding is inferred, for example by looking at the query declaration
- Throws:
- XPathException- if a static error exists in the query
- IOException- if the input cannot be read
- UnsupportedOperationException- if not using Saxon-EE
- Since:
- 9.2 (changed in 9.3 to return void)
 
- 
getCompiledLibraryGet a previously compiled library module- Parameters:
- namespace- the module namespace
- Returns:
- the QueryLibrary if a module with this namespace has been compiled as a library module; otherwise null. Always null when not using Saxon-EE.
- Since:
- 9.3
 
- 
getCompiledLibraries
- 
declareNamespaceDeclare a namespace whose prefix can be used in expressions. This is equivalent to declaring a prefix in the Query prolog. Any namespace declared in the Query prolog overrides a namespace declared using this API.- Parameters:
- prefix- The namespace prefix. Must not be null. Setting this to "" means that the namespace will be used as the default namespace for elements and types.
- uri- The namespace URI. Must not be null. The value "" (zero-length string) is used to undeclare a namespace; it is not an error if there is no existing binding for the namespace prefix.
- Throws:
- NullPointerException- if either the prefix or URI is null
- IllegalArgumentException- if the prefix is "xml" and the namespace is not the XML namespace, or vice versa; or if the prefix is "xmlns", or the URI is "http://www.w3.org/2000/xmlns/"
- Since:
- 9.0
 
- 
clearNamespacespublic void clearNamespaces()Clear all the user-declared namespaces- Since:
- 9.0
 
- 
getUserDeclaredNamespacesGet the map of user-declared namespaces- Returns:
- the user-declared namespaces
 
- 
iterateDeclaredPrefixesGet the namespace prefixes that have been declared using the methoddeclareNamespace(java.lang.String, net.sf.saxon.om.NamespaceUri)- Returns:
- an iterator that returns the namespace prefixes that have been explicitly declared, as strings. The default namespace for elements and types will be included, using the prefix "".
- Since:
- 9.0
 
- 
getNamespaceForPrefixGet the namespace URI for a given prefix, which must have been declared using the methoddeclareNamespace(java.lang.String, net.sf.saxon.om.NamespaceUri).- Parameters:
- prefix- the namespace prefix, or "" to represent the null prefix
- Returns:
- the namespace URI. Returns "" to represent the non-namespace, null to indicate that the prefix has not been declared
 
- 
getDefaultFunctionNamespaceGet the default function namespace- Returns:
- the default function namespace (defaults to the fn: namespace)
- Since:
- 8.4
 
- 
setDefaultFunctionNamespaceSet the default function namespace- Parameters:
- defaultFunctionNamespace- The namespace to be used for unprefixed function calls
- Since:
- 8.4
 
- 
setDefaultElementNamespaceSet the default element namespace- Parameters:
- uri- the namespace URI to be used as the default namespace for elements and types
- Since:
- 8.4
 
- 
getDefaultElementNamespaceGet the default namespace for elements and types- Returns:
- the namespace URI to be used as the default namespace for elements and types
- Since:
- 8.9 Modified in 8.9 to return the namespace URI as a string rather than an integer code
 
- 
getUnprefixedElementMatchingPolicyGet the matching policy for unprefixed element names in axis steps. This is a Saxon extension. The value can be any ofUnprefixedElementMatchingPolicy.DEFAULT_NAMESPACE(the default), which uses the value ofgetDefaultElementNamespace(), orUnprefixedElementMatchingPolicy.DEFAULT_NAMESPACE_OR_NONE, which matches both the namespace given ingetDefaultElementNamespace()and the null namespace, orUnprefixedElementMatchingPolicy.ANY_NAMESPACE, which matches any namespace (that is, it matches by local name only).
- 
setUnprefixedElementMatchingPolicypublic void setUnprefixedElementMatchingPolicy(UnprefixedElementMatchingPolicy unprefixedElementMatchingPolicy) Set the matching policy for unprefixed element names in axis steps. This is a Saxon extension. The value can be any ofUnprefixedElementMatchingPolicy.DEFAULT_NAMESPACE(the default), which uses the value ofgetDefaultElementNamespace(), orUnprefixedElementMatchingPolicy.DEFAULT_NAMESPACE_OR_NONE, which matches both the namespace given ingetDefaultElementNamespace()and the null namespace, orUnprefixedElementMatchingPolicy.ANY_NAMESPACE, which matches any namespace (that is, it matches by local name only).
- 
declareGlobalVariablepublic void declareGlobalVariable(StructuredQName qName, SequenceType type, GroundedValue value, boolean external) throws XPathException Declare a global variable. This has the same effect as including a global variable declaration in the Query Prolog of the main query module. A static error occurs when compiling the query if the query prolog contains a declaration of the same variable.- Parameters:
- qName- the qualified name of the variable
- type- the declared type of the variable
- value- the initial value of the variable. May be null if the variable is external.
- external- true if the variable is external, that is, if its value may be set at run-time.
- Throws:
- NullPointerException- if the value is null, unless the variable is external
- XPathException- if the value of the variable is not consistent with its type.
- Since:
- 9.1
 
- 
iterateDeclaredGlobalVariablesIterator over all the declared global variables- Returns:
- an iterator over all the global variables that have been declared. They are returned
         as instances of class GlobalVariable
- Since:
- 9.1
 
- 
clearDeclaredGlobalVariablespublic void clearDeclaredGlobalVariables()Clear all declared global variables- Since:
- 9.1
 
- 
setModuleURIResolverSet a user-defined ModuleURIResolver for resolving URIs used in "import module" declarations in the XQuery prolog. This will be used for resolving URIs in XQuery "import module" declarations, overriding any ModuleURIResolver that was specified as part of the configuration.- Parameters:
- resolver- the ModuleURIResolver to be used
 
- 
getModuleURIResolverGet the user-defined ModuleURIResolver for resolving URIs used in "import module" declarations in the XQuery prolog; returns null if none has been explicitly set either on the StaticQueryContext or on the Configuration.- Returns:
- the registered ModuleURIResolver
 
- 
declareDefaultCollationSet the default collation.- Parameters:
- name- The collation name, as specified in the query prolog. Must be the name of a known registered collation.
- Throws:
- NullPointerException- if the supplied value is null
- IllegalStateException- if the supplied value is not a known collation URI registered with the configuration.
- Since:
- 8.4. Changed in 9.7.0.15 so that it validates the collation name: see bug 3121.
 
- 
getDefaultCollationNameGet the name of the default collation.- Returns:
- the name of the default collation; or the name of the codepoint collation if no default collation has been defined. The name is returned in the form it was specified; that is, it is not yet resolved against the base URI. (This is because the base URI declaration can follow the default collation declaration in the query prolog.) If no default collation has been specified, the "default default" (that is, the Unicode codepoint collation) is returned.
- Since:
- 8.4
 
- 
setRequiredContextItemTypeDeclare the static type of the context item. If this type is declared, and if a context item is supplied when the query is invoked, then the context item must conform to this type (no type conversion will take place to force it into this type).- Parameters:
- type- the required type of the context item
 
- 
getRequiredContextItemTypeGet the required type of the context item. If no type has been explicitly declared for the context item, an instance of AnyItemType (representing the type item()) is returned.- Returns:
- the required type of the context item
 
- 
getNamePoolGet the NamePool used for compiling expressions- Returns:
- the name pool
- Since:
- 8.4
 
- 
getSystemIdGet the system ID of the container of the expression. Used to construct error messages. Note that the systemID and the Base URI are currently identical, but they might be distinguished in the future.- Returns:
- the Base URI
- Since:
- 8.4
 
- 
getBaseURIGet the Base URI of the query, for resolving any relative URI's used in the expression. Note that the systemID and the Base URI are currently identical, but they might be distinguished in the future. Used by the document() function.- Returns:
- the base URI of the query
- Since:
- 8.4
 
- 
setPreserveBoundarySpacepublic void setPreserveBoundarySpace(boolean preserve) Set the policy for preserving boundary space- Parameters:
- preserve- true if boundary space is to be preserved, false if it is to be stripped
- Since:
- 9.0
 
- 
isPreserveBoundarySpacepublic boolean isPreserveBoundarySpace()Ask whether the policy for boundary space is "preserve" or "strip"- Returns:
- true if the policy is to preserve boundary space, false if it is to strip it
- Since:
- 9.0
 
- 
setEmptyLeastpublic void setEmptyLeast(boolean least) Set the option for where an empty sequence appears in the collation order, if not otherwise specified in the "order by" clause- Parameters:
- least- true if the empty sequence is considered less than any other value (the default), false if it is considered greater than any other value
- Since:
- 9.0
 
- 
isEmptyLeastpublic boolean isEmptyLeast()Ask where an empty sequence should appear in the collation order, if not otherwise specified in the "order by" clause- Returns:
- true if the empty sequence is considered less than any other value (the default), false if it is considered greater than any other value
- Since:
- 9.0
 
- 
setErrorListenerDeprecated.since 10.0: usesetErrorReporter(ErrorReporter)Set the ErrorListener to be used to report compile-time errors in a query. This will also be the default for the run-time error listener used to report dynamic errors.- Parameters:
- listener- the ErrorListener to be used
 
- 
getErrorListenerDeprecated.since 10.0: usegetErrorReporter()Get the ErrorListener in use for this static context- Returns:
- the registered ErrorListener
 
- 
setErrorReporterSet an error reporter: that is, a used-supplied object that is to receive notification of static errors found in the stylesheet- Parameters:
- reporter- the object to be notified of static errors
- Since:
- 10.0
 
- 
getErrorReporterGet the error reporter: that is, a used-supplied object that is to receive notification of static errors found in the stylesheet- Returns:
- the object to be notified of static errors. This may be the error reporter
 that was previously set using setErrorReporter(ErrorReporter), or it may be a system-allocated error reporter.
- Since:
- 10.0
 
- 
setUpdatingEnabledpublic void setUpdatingEnabled(boolean updating) Say whether the query is allowed to be updating. XQuery update syntax will be rejected during query compilation unless this flag is set.- Parameters:
- updating- true if the query is allowed to use the XQuery Update facility (requires Saxon-EE). If set to false, the query must not be an updating query. If set to true, it may be either an updating or a non-updating query.
- Since:
- 9.1
 
- 
isUpdatingEnabledpublic boolean isUpdatingEnabled()Ask whether the query is allowed to be updating- Returns:
- true if the query is allowed to use the XQuery Update facility. Note that this does not necessarily mean that the query is an updating query; but if the value is false, the it must definitely be non-updating.
- Since:
- 9.1
 
 
- 
getErrorReporter()