XQuery Validation problem with imported modules
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 56
- Joined: Fri Jun 06, 2008 8:05 pm
XQuery Validation problem with imported modules
I am having problems validating XQuery files stored in eXist, if the XQuery file imports an XQuery module via a relative path. I believe this is an oXygen issue, not an eXist issue.
If I use a relative path, I can only get a red light during validation, not a green light. For example, this will give me a red light:
The only way that oXygen will validate and give me the green light is if I provide an absolute URI, e.g.:
Wolfgang Meier (the creator of eXist) corroborated this issue: "oXygen does correctly resolve the import if the main XQuery was loaded from the file system, but *not* if you opened it using WebDAV. The error message indicates that Oxygen is looking for the module on the file system."
Thus, my bug/feature request: Add the ability for oXygen's XQuery Validation to resolve a relative path to a module imported by an XQuery file stored in eXist-db. In other words, relative paths should be evaluated relative to the location of the original XQuery file.
Note: I'm using oXygen XML Editor v11.1 with eXist 1.4.x-stable. By "validate" I mean open an XQuery file and select Document > Validate > Validate Document. I've selected my eXist instance as my XQuery validator via Preferences > XQuery > XQuery Validate with. Otherwise, XQuery validation and function auto completion work perfectly, so I know the connection with eXist works.
Please let me know if I can provide any other information.
Thank you,
Joe
If I use a relative path, I can only get a red light during validation, not a green light. For example, this will give me a red light:
Code: Select all
import module namespace myns="http://mysite.com/myns" at "modules/mymodule.xqm";
Code: Select all
import module namespace myns="http://mysite.com/myns" at "xmldb:exist:///db/site/modules/mymodule.xqm";
Thus, my bug/feature request: Add the ability for oXygen's XQuery Validation to resolve a relative path to a module imported by an XQuery file stored in eXist-db. In other words, relative paths should be evaluated relative to the location of the original XQuery file.
Note: I'm using oXygen XML Editor v11.1 with eXist 1.4.x-stable. By "validate" I mean open an XQuery file and select Document > Validate > Validate Document. I've selected my eXist instance as my XQuery validator via Preferences > XQuery > XQuery Validate with. Otherwise, XQuery validation and function auto completion work perfectly, so I know the connection with eXist works.
Please let me know if I can provide any other information.
Thank you,
Joe
-
- Posts: 56
- Joined: Fri Jun 06, 2008 8:05 pm
Re: XQuery Validation problem with imported modules
Wolfgang added in a followup e-mail:
Sorry, I was mistaken. The error message is coming from eXist.
If I remember well, oXygen just sends the entire query to eXist for
validation. However, eXist has no idea where the query source was
loaded from. I guess we need to find a way for oXygen to pass a module
load path which can be used by eXist to resolve the imports correctly.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: XQuery Validation problem with imported modules
Hello,
I can confirm what Wolfgang has mentioned, oXygen sends the entire query to eXist for validation. As far as I know there is no way to specify a server URI for the XQuery through the API so that's why the relative location of the module cannot be determined for XQuery validation or execution.
We will investigate and if the API has or will have the possibility to specify the XQuery URI we will support it in a future version.
Regards,
Adrian
I can confirm what Wolfgang has mentioned, oXygen sends the entire query to eXist for validation. As far as I know there is no way to specify a server URI for the XQuery through the API so that's why the relative location of the module cannot be determined for XQuery validation or execution.
We will investigate and if the API has or will have the possibility to specify the XQuery URI we will support it in a future version.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XQuery Validation problem with imported modules
Hi,
Just to update this thread, Oxygen 15.0 also sends to the server when validating a module the base URI of the module, thus allowing the server to properly resolve relative references.
Regards,
Radu
Just to update this thread, Oxygen 15.0 also sends to the server when validating a module the base URI of the module, thus allowing the server to properly resolve relative references.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Sat Jul 18, 2020 6:15 pm
Re: XQuery Validation problem with imported modules
I am getting this same problem in oxygen 21.1 with a WebDAV datasource connection to eXist 5.1.1. I open an xquery from WebDAV and the relative path of the imported module cannot resolve. I open the same xquery using xmlrpc and it works fine.
Regression?
Regression?
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XQuery Validation problem with imported modules
Hi Darin,
This is not a regression, in Oxygen 15 we fixed things to properly work with the xmlrpc API (API which is used to validate the XQuery), before it even when using the xmlrpc API you got a validation error when your XQuery imported a module.
When using Webdav, the XQuery validation is not done against the Exist server, it's done with the Saxon XSLT processor bundled with Oxygen which probably has a hard time finding the import if the reference is not relative to the current XQuery file.
Regards,
Radu
This is not a regression, in Oxygen 15 we fixed things to properly work with the xmlrpc API (API which is used to validate the XQuery), before it even when using the xmlrpc API you got a validation error when your XQuery imported a module.
When using Webdav, the XQuery validation is not done against the Exist server, it's done with the Saxon XSLT processor bundled with Oxygen which probably has a hard time finding the import if the reference is not relative to the current XQuery file.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service