BaseXdb/basex — pull request #806 by LeoWoerteler (2013-11-25 09:25:22+00:00)
Title: Unique Variable Names in Expr#toString()

Because of inlining, the output of `Expr#toString()` can become invalid when a variable reference is inlined into the scope of another variable with the same name:
```xquery
let $a := random:integer()
let $b := $a
for $a in 1 to 10
return $b
```
... would be shown as
```xquery
let $a := random:integer()
for $a in (1 to 10)
return $a
```
Now it will become:
```xquery
let $a_0 := random:integer()
for $a_2 in (1 to 10)
return $a_0
```
This change makes the output of the *Query Info* a bit less readable in simple cases, but a low less confusing in more complex ones.