In a previous question I've asked about support for running XQuery in XSLT 3.0. (Is there a way to run XQuery functions / or XQuery scripts locally within an XSLT script file?) and the answer was it's possible using saxon:compile-query/saxon:query however I'm now curious to know whether this would allow one to run XQuery with the Update facility e.g. run a copy modify return expression or an update function? All in Saxon EE 9.9.
In a previous question I've asked about support for running XQuery in XSLT 3.0. (Is there a way to run XQuery functions / or XQuery scripts locally within an XSLT script file?) and the answer was it's possible using saxon:compile-query/saxon:query however I'm now curious to know whether this would allow one to run XQuery with the Update facility e.g. run a copy modify return expression or an update function? All in Saxon EE 9.9.
Share Improve this question asked Feb 4 at 16:59 AlexAlex 295 bronze badges 3 |1 Answer
Reset to default 0There's certainly no proven/validated/supported/out-of-the-box way of doing this. It can probably be done by crafting your own Java extension functions.
saxon:compile-query
code does that to ensure any kind of query is compilable. – Martin Honnen Commented Feb 4 at 18:07<xquery allowUpdate="true"/>
is or if you programmatically set the configuration featureFeature.XQUERY_ALLOW_UPDATE
to true then theStaticQueryContext
created for thesaxon:compile-query
is probably one whereisUpdatingEnabled
is true. Wait for an answer from Michael Kay, he knows that stuff much better. – Martin Honnen Commented Feb 4 at 20:19saxon:query
is up to the task to process an updating query, even if you get it compiled. – Martin Honnen Commented Feb 4 at 20:41