How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Martin Honnen
Posts: 96
Joined: Tue Aug 19, 2014 12:04 pm

How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by Martin Honnen »

oXygen 18 allows me to select Saxon EE XQuery 9.7.0.4 (External) as an XQuery processor but when I use an XQuery with version "3.1" I get an error
Engine name: Saxon-EE XQuery 9.7.0.4 (External)
Severity: fatal
Description: XQuery 3.1 was not enabled when invoking Saxon
How can I use Saxon 9.7 and XQuery 3.1 with oXygen?
Costin
Posts: 828
Joined: Mon Dec 05, 2011 6:04 pm

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by Costin »

Hi Martin,

The XQuery 3.1 support has been implemented in Saxon 9.7, thus Oxygen v18, which bundles Saxon 9.6, does not provide a specific option to enable it.

In general, any Saxon options which are not available in the Oxygen configuration can be defined via a Saxon configuration file.
In your specific case, to activate the XQuery 3.1 support for Saxon, you should create a configuration file with the following lines:

Code: Select all

<configuration edition="EE" xmlns="http://saxon.sf.net/ns/configuration">
<xquery version="3.1"/>
</configuration>
Then save the configuration file somewhere on your disk and use it in your scenario.
You can pass your configuration file in a transformation scenario configuration dialog, in the Advanced Options (small blue cogwheel at the right of the "Transformer") and apply the changes.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
irasgo
Posts: 2
Joined: Thu Mar 09, 2017 10:05 pm

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by irasgo »

Hello,
Using the advice found here, I've created a config file (named config-xquer.xml) and then change the transformation scenario. But I think I'm doing something wrong.
I have created a simple xquery file

Code: Select all


xquery version "3.0";
<first>
{
let $a:=json-doc("product.json")
}
</first>
But, I get this error: [Saxon-EE XQuery 9.6.0.7] XPST0017: Unknown system function json-doc()

So, I can't go forward. Any help? Is the configuration file wrong? or which type of things can we do with oxygen 18 and Json?

Thanks in advance. Best regards,
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by adrian »

Hi,

json-doc() is available in XQuery 3.1, supported since Saxon-EE 9.7. You are using XQuery 3.0 (your XQuery file defines it as 3.0) with the bundled Saxon-EE 9.6, which does not support XQuery 3.1.

To make this work:
1. Edit the XQuery file and specify the correct XQuery version, 3.1.

2. Install the add-on for Saxon-EE 9.7 (External). Go to menu > Help > "Install new add-ons", pick the "default" update site (http://www.oxygenxml.com/InstData/Addon ... teSite.xml) and install Saxon 9.7 XSLT and XQuery Transformer.

3. After restarting Oxygen, edit the transformation scenario and select from the Transformer combo Saxon-EE XQuery 9.7.0.x (External). Press the "Advanced options" button (cogwheel), and select your Saxon configuration file.

4. Run the transformation.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
irasgo
Posts: 2
Joined: Thu Mar 09, 2017 10:05 pm

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by irasgo »

It worked !!!
Thanks a lot
sylee
Posts: 1
Joined: Tue Jun 13, 2017 7:30 pm

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by sylee »

Hello,

I am using oXygen 19 and Saxon 9.7.0.15. But I seem to run into a similar problem when I try to use XQuery 3.1. I get the XQST0031 error and the message that "XQuery 3.1 was not enabled when invoking Saxon.

How can I activate XQuery 3.1?


Best,
SY
ionela
Posts: 400
Joined: Mon Dec 05, 2011 6:08 pm

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by ionela »

Hi,

XQuery 3.1 support is still not available by default in the current build of oXygen v19.0.

As a workaround, in order to activate the XQuery 3.1 support for Saxon you should create a configuration file as specified above:

Code: Select all

<configuration edition="EE" xmlns="http://saxon.sf.net/ns/configuration">
<xquery version="3.1"/>
</configuration>
The XQuery 3.1 support will be available by default in oXygen probably in a next maintenance build or in the next version (v19.1) at most.

We'll update this thread when this is available.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
ionela
Posts: 400
Joined: Mon Dec 05, 2011 6:08 pm

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by ionela »

Hello,

Just to update the thread, XQuery 3.1 support is available in the latest maintenance build of Oxygen 19.0, 2017062918 (released on July 5th):
Saxon XQuery: XQuery 3.1 support is now available (default enabled) for the Saxon XQuery processor. This can be controlled in general options and in the transformation scenario transformer specific options.
You can download it from our web site:
http://www.oxygenxml.com/download.html

The list of bug-fixes can be found here:
http://www.oxygenxml.com/build_history.html#2017062918

You can follow the release/build RSS feed here:
http://www.oxygenxml.com/rssBuildID.xml

Let us know if you encounter further problems with this new build.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
dsewell
Posts: 125
Joined: Mon Jun 09, 2003 6:02 pm
Location: Charlottesville, Virginia USA

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by dsewell »

Excellent, I was just about to start learning some of the new features of XQuery 3.1 when I saw that the new release supported it.

It may be that the syntax coloring will need to be modified to support new 3.1 features. For example, the array syntax in the third argument to concat() here, which should probably be colored similarly to the sequence above it:

Image
ionela
Posts: 400
Joined: Mon Dec 05, 2011 6:08 pm

Re: How to use XQuery 3.1 with oXygen 18 and Saxon EE 9.7?

Post by ionela »

Hello,

Thank you for your feedback and for letting us know about this syntax highlight problem.
I have logged it to our issue tracking tool in order to be resolved in a future version of oXygen. We'll notify the thread when the bugfix is available.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
Post Reply