ligasgr / intellij-xquery

Plugin to support XQuery in Intellij Idea
Apache License 2.0
35 stars 23 forks source link

Native runner for eXist DB #98

Closed vladimirkroupa closed 8 years ago

vladimirkroupa commented 10 years ago

In 1.0.0_13 an exception occurs when trying to run the following XQuery file.

xquery version "3.0";

"Hello" || "world!"
Exception in thread "main" javax.xml.xquery.XQException:
  XQJQS001 - Invalid XQuery syntax, syntax does not pass static validation.
  Root Cause:
  XQueryParseException: Encountered "|" at line 3, column 10.
Was expecting one of:
    "xquery" ...
ligasgr commented 10 years ago

Hi, Thanks for raising. The issue is in XQJ driver implementation. I assume you're using eXist DB. This code works fine if you use Saxon-PE/EE or Zorba to run it. I raised an issue in XQJ.net (http://xqj.net/issues/view.php?id=36). If the issue is not fixed in a timely manner I'll probably rewrite runner to use native api.

vladimirkroupa commented 10 years ago

Thanks for the info! You're right, I'm using eXist. I should have mentioned that.

cfoster commented 10 years ago

Just noticed this. I will update the eXist XQJ driver to support XQuery 3.0 if it does not already.

In the short term, I suggest using fn:concat instead of the || operator.

ligasgr commented 10 years ago

Hi Charles, Thanks for having a look at it. The issue affects not only eXist driver but also Marklogic, Sedna and BaseX (even the local mode - version 1.3.0).