Using XQuery 3.1 with output methods adpative or json
Posted: Sun Feb 24, 2019 1:42 pm
Using the recent oXygen 21 release, I had hoped there is now a way to use XQuery 3.1 with any of the installed Saxon 9.8.0.12 engines (i.e. HE, PE, EE) to make use of XQuery 3.1 directives like
and then be able to have the result be serialized according the declared output method.
However, whatever I try, I either get some wrong result (for a simple arrray
) with "present as sequence" I get only the array items output as
instead of the
Saxon gives from the command line.
And when I try show result in editor I get an error
System ID: C:\SomePath\array-literal1.xq
Scenario: array-literal11
XQuery file: C:\SomePath\array-literal1.xq
Engine name: Saxon-HE XQuery 9.8.0.12
Severity: error
Description: Wrapped output: cannot display a function item
Is there some way to use the Saxon XQuery engines installed within oXygen 21 in a XQuery transformation scenario to have them use and apply the serialization methods "adapative" or "json" declared in the query code?
Code: Select all
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method 'adaptive';
However, whatever I try, I either get some wrong result (for a simple arrray
Code: Select all
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method 'adaptive';
[1, 2, 3, 4]
Code: Select all
1
2
3
4
Code: Select all
[1,2,3,4]
And when I try show result in editor I get an error
System ID: C:\SomePath\array-literal1.xq
Scenario: array-literal11
XQuery file: C:\SomePath\array-literal1.xq
Engine name: Saxon-HE XQuery 9.8.0.12
Severity: error
Description: Wrapped output: cannot display a function item
Is there some way to use the Saxon XQuery engines installed within oXygen 21 in a XQuery transformation scenario to have them use and apply the serialization methods "adapative" or "json" declared in the query code?