Support #1382
closedCircular definition of variable
0%
Description
SourceForge user: wcordewiner
I use Saxon 7.9.1 and appear to have a problem with
(cascaded) XQuery module imports. Attached a zip
file containing the query and module which
reproduces the problem. The query imports a module
(module1.xq) containing a variable declaration. That
module again imports a module (module2.xq) again
containing a variable declaration. When a execute
the query, I get an error "Circular definition of
variable m2:pi" but to my knowledge there are no
circular variable definitions.
Wouter Cordewiner
Files
Updated by Anonymous over 20 years ago
SourceForge user: mhkay
Logged In: YES
user_id=251681
Thanks for reporting this. It turns out to be a rather nasty
error in the algorithm for allocating slot numbers to global
variables in XQuery - the two variables are being given the
same slot number (i.e. the same location in storage). I'm
working on it. It happens because global variables can be
imported into a module without being imported into the
top-level module.
Michael Kay
Please register to edit this issue