BaseXdb/basex — Issue #301: add source code prettyprint / tidy capability
Author: jidanni
Created: 2011-12-03 11:53:22+00:00
State: open

It occurred to me that as basex has read in our xquery program and
analyzed it, it would be a perfect opportunity to spit it back out
in a tidy (e.g., "perltidy - a perl script indenter and reformatter")
-like format. Especially as no such formatter is apparently currently
available and one can only keep ones .xq files tidy by hand.

And while you are at it, please add a switch to make -V also output properly
indented, e.g., instead of

- pre-evaluating if(false()) then for $s ...

Result: element { "kml" } { element { "Doc...

each all on one long line.

On the other hand, many famous TIDY programs are NOT bundled into mother programs, increasing their complexity... so maybe these are bad ideas to add to basex.