Syntax error in variable declarations using URIQualifiedName
Saturday, 27 June 2026 · 3 messages
AS
Andrew Sales27 Jun 2026 18:19 #
Hello,
The query:
let $Q{}foo:=1
return $Q{}fooproduces 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
GR
Gunther Rademacher27 Jun 2026 21:21 #
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/
Quoted text · Andrew Sales · 21 lines
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
AS
Andrew Sales27 Jun 2026 21:37 #
Thank you, Gunther (and team) for such prompt support, as ever!
All best wishes,
Andrew
Quoted text · Gunther Rademacher · 38 lines
On Sat, Jun 27, 2026, 20:21 Gunther Rademacher <grd at 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 > >
Written for BaseX 12.4. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery