XQuery Outline view does not show annotated functions

Issues related to W3C XQuery.
jakubm
Posts: 12

XQuery Outline view does not show annotated functions

Sun Jan 13, 2013 1:03 pm

When I add annotations to my functions, I no longer see the functions in Outline view.

Particularly the annotations from restxq namespace (http://exquery.org/ns/restxq, see http://exquery.github.com/exquery/exque ... ation.html).

declare
%rest:path(...)
%rest:GET
function myns:foo(...)
{

};

=> myns:foo is not shown in Outline.
adrian
Posts: 2326

Re: XQuery Outline view does not show annotated functions

Mon Jan 14, 2013 6:49 pm

Hello,

Unfortunately, currently(v14.1) Oxygen is not aware of such annotations and the Outline view breaks when encountering one.
I've submitted a request on our issue tracking tool to support them in a future version of Oxygen.

But I'm curious, how do you validate such an XQuery, or how do you use it in Oxygen?
Saxon 9 PE/EE doesn't seem to validate or process an XQuery file with such annotations.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
jakubm
Posts: 12

Re: XQuery Outline view does not show annotated functions

Mon Jan 14, 2013 7:14 pm

This is a RESTXQ function stored in eXist DB (eXist DB supports RESTXQ).

I have oXygen connected to eXist database, but since it is a REST interface, the query is run by eXist when a certain REST request is recieved by the RESTXQ module. It is not usually "run" from oXygen adhoc (but even RESTXQ module can be imported by other modules and in that case the functions can be used as any other functions). When I use custom transformation scenario with exist 2.0 driver, these functions can be loaded just fine.

Annotations are a part of XQuery 3.0 (http://www.w3.org/TR/xquery-30/#id-annotations) and Saxon and other processors will probably come with annotations of their own (at least %private, which is defined in the spec). With other annotations, the best strategy for oXygen is probably to ignore them, but in some cases, oXygen might not be able to execute the annotated function. This will be the case of annotations such as
%java:method("java.lang.Math.sin") (example from the spec)
which actually tells the processor to call a Java function instead of the XQuery expression in the body of the function.

Nevertheless, there is no reason why Outline view should not work for annotated functions.
adrian
Posts: 2326

Re: XQuery Outline view does not show annotated functions

Tue Jan 15, 2013 6:51 pm

Hi,

Thank you for the detailed explanation. I've mentioned it on our issue tracking tool.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
Posts: 5088

Re: XQuery Outline view does not show annotated functions

Fri Jun 26, 2015 2:31 pm

Hi,

Just to update this thread, the issue should be fixed in Oxygen 17.0.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “XQuery”

Who is online

Users browsing this forum: No registered users and 0 guests