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: 44

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

Sat Jul 09, 2016 1:00 pm

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: 437

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

Mon Jul 11, 2016 3:00 pm

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

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

Thu Mar 09, 2017 10:27 pm

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: 2461

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

Fri Mar 10, 2017 12:58 pm

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

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

Mon Mar 13, 2017 5:54 pm

It worked !!!
Thanks a lot
sylee
Posts: 1

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

Tue Jun 13, 2017 7:34 pm

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: 231

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

Tue Jun 13, 2017 10:53 pm

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: 231

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

Fri Jul 07, 2017 4:08 pm

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: 108
Location: Charlottesville, Virginia USA

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

Wed Aug 02, 2017 5:42 pm

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: 231

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

Thu Aug 03, 2017 4:30 pm

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

Return to “Common Problems”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests