Handle XDebug error messages to appear at an XML conforming position in the output, db acces data from global to local, report error messages from the mysql driver for easier diagnostics. Fix $glossTable empty because it is no global variable anymore.