There are a number of limitations when queries are compiled to Java code:
Collations are not supported on all function calls (especially when supplied as dynamic values)
Loop-lifted expressions are evaluated eagerly, which means that dynamic errors may occur that should be masked
Many native Saxon extensions are unsupported, including functions such as saxon:function()
and saxon:call()
, saxon:format-number()
and saxon:analyze-string()
.
XQuery Update and XQuery 1.1 extensions are not supported.
Not all calls to external (Java) functions are supported. In particular, calls that involve
collections and arrays may not work, as well as other calls where no static type information is available.
It's always possible to circumvent any restrictions by writing a Java wrapper around the desired target
method that takes Saxon values as its arguments and result type (that is, classes such as NodeInfo
,
ValueRepresentation
and SequenceIterator
.) There should also be no difficulty passing
simple atomic values such as strings, numbers, and booleans.