XQuery 3.1 implementation
Added more command line options related to tracing:
-Tout:filename specifies the destination for -T trace output;
-Tlevel:(none|low|normal|high) controls the level of detail in the output. The same functionality
is available via API and configuration options. For more information see Configuration Features.
-qs option is used on the command line, the static base URI of the query is the current working
directory. (See Running XQuery from the Command Line.)
Type checking on maps has been improved. In particular, the static type of the expression
map:get(M, K) (or equivalent
constructs such as
M?K is now deduced from the type of the map if known. The checking is even
stronger if the new (Saxon-specific) mechanism of tuple types (now renamed "record types") is used: see
Annotations on functions, including annotation assertions, are now fully supported. The annotation information is now retained
as a property of a function and its type. Multiple annotations with the same name are allowed (which requires some change to internal
data structures). The
Configuration allows a
FunctionAnnotationHandler to be registered for a
namespace; this handler is invoked to determine whether functions having particular annotations satisfy or fail to satisfy
particular annotation assertions in that namespace.
The new extension function saxon:function-annotations() is made available to obtain access to the annotations defined in a function declaration.
A user-defined function in XQuery may now be designated as a memo function by using an annotation:
declare %saxon:memo-function local:f..... Option declarations may continue to be used for the
same purpose, for backwards compatibility.