Project

Profile

Help

Bug #2604

closed

Incorrect location for XQuery error

Added by Alin Balasa over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2016-01-27
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Platforms:

Description

The latest Saxon 9.7 reports errors with invalid location when compiling/executing XQuery files.

For the following sample:

<results>
    {
        let $a := doc("bib.xml")//author
        let $b := position($a)
        for $last in distinct-values($a/last),
            $first in distinct-values($a[last = $last]/first)
        order by $last,
            $first
        return
            <result>
            </result>
    }
</results>

the latest Saxon distribution reports the next error:

Static error on line 5 at column 21 of file:/D:/workspace_development_branch/eXml-branch-development/test.xquerynear {... := position($a) for $}
  XPST0017: System function position() cannot be called with one argument
Static error(s) in query

Running the same XQuery with Saxon 9.6 will produce the expected result:

Error on line 4 column 19 of test.xquery:
  XPST0017 XQuery static error near #... := position($a) for $#:
    System function position() cannot be called with one argument
Static error(s) in query

I used the next command line to run the XQuery file:

java -cp lib\saxon9ee.jar net.sf.saxon.Query -q:test.xquery

Please register to edit this issue

Also available in: Atom PDF