Syntax error in variable declarations using URIQualifiedName
Hello, The query: let $Q{}foo:=1 return $Q{}foo produces a syntax error, unless it is amended to: let $Q{}foo :=1 return $Q{}foo (i.e. space inserted before the colon.) This first occurs with BaseX 12.1 and with earlier versions did not produce a syntax error. For comparison, this syntax error is not observed under Saxon XQuery 12.9 or 13.0, or (with Saxon or BaseX) if the variable is a QName instead. Many thanks, Andrew
Hi Andrew, thank you for reporting this. The bug was introduced with the recent addition of support for the optional prefix in a URIQualifiedName. It has now been handled by PR 2701 [1], which has since been merged to the main branch. The fix is also present in the latest snapshot [2]. Best regards, Gunther [1] https://github.com/BaseXdb/basex/pull/2701 [2] https://files.basex.org/releases/latest/ On 6/27/2026 6:19 PM, Andrew Sales via BaseX-Talk wrote:
Hello,
The query:
let $Q{}foo:=1 return $Q{}foo
produces a syntax error, unless it is amended to:
let $Q{}foo :=1 return $Q{}foo
(i.e. space inserted before the colon.) This first occurs with BaseX 12.1 and with earlier versions did not produce a syntax error. For comparison, this syntax error is not observed under Saxon XQuery 12.9 or 13.0, or (with Saxon or BaseX) if the variable is a QName instead.
Many thanks, Andrew
Thank you, Gunther (and team) for such prompt support, as ever! All best wishes, Andrew On Sat, Jun 27, 2026, 20:21 Gunther Rademacher <grd@gmx.net> wrote:
Hi Andrew,
thank you for reporting this. The bug was introduced with the recent addition of support for the optional prefix in a URIQualifiedName. It has now been handled by PR 2701 [1], which has since been merged to the main branch. The fix is also present in the latest snapshot [2].
Best regards, Gunther
[1] https://github.com/BaseXdb/basex/pull/2701 [2] https://files.basex.org/releases/latest/
On 6/27/2026 6:19 PM, Andrew Sales via BaseX-Talk wrote:
Hello,
The query:
let $Q{}foo:=1 return $Q{}foo
produces a syntax error, unless it is amended to:
let $Q{}foo :=1 return $Q{}foo
(i.e. space inserted before the colon.) This first occurs with BaseX 12.1 and with earlier versions did not produce a syntax error. For comparison, this syntax error is not observed under Saxon XQuery 12.9 or 13.0, or (with Saxon or BaseX) if the variable is a QName instead.
Many thanks, Andrew
participants (2)
-
Andrew Sales -
Gunther Rademacher