Bug #2604
closedIncorrect location for XQuery error
0%
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
Updated by Michael Kay over 8 years ago
- Status changed from New to Duplicate
- Priority changed from Low to Normal
Thanks for reporting it, but this appears to be a duplicate of Bug 2575.
Updated by Alin Balasa over 8 years ago
Michael Kay wrote:
Thanks for reporting it, but this appears to be a duplicate of Bug 2575.
I have tested with the latest Saxon 9.7.0.2 maintenance build available on the website. I have browsed the SVN history and it seems
that the revisions associated with the Bug 2575 should be already included in the Saxon 9.7.0.2 maintenance build.
Is it something that I missed?
Updated by Michael Kay over 8 years ago
- Status changed from Duplicate to In Progress
Updated by O'Neil Delpratt about 8 years ago
- Status changed from In Progress to Resolved
- Found in version deleted (
9.7.0.2) - Applies to branch 9.7 added
- Fix Committed on Branch 9.7 added
We have made some further refinement in this area and committed to subversion.
We have also fixed a related line number bug sent from Oxygenxml which was reporting line number -2 in the following code:
...
public static void main(String[] args) {
try {
XpathPerformer.compileQueryWithS9API("//personal&");
} catch (net.sf.saxon.trans.XPathException e) {
SourceLocator locator = e.getLocator();
System.out.println("Line: " + locator.getLineNumber());
System.out.println("Column: " + locator.getColumnNumber());
}
...
Updated by O'Neil Delpratt about 8 years ago
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 9.7.0.3 added
Bug fix applied in the Saxon 9.7.0.3 maintenance release.
Please register to edit this issue