The eXist Database stores binary files as well as XML files. Binary files include the XQuery scripts themselves. This allows XQuery scripts to manipulate the XQuery scripts themselves - viewing, searching, analyzing, modifying and creating scripts, all the operations required of a development environment.
Viewing the XQuery scriptEdit
The eXist util module includes functions to read binary documents and convert to text. Here they are used to view a script. In this public interface, a configuration file is used to control access to those scripts.
<config> <base>/db/Wiki/IDE</base> <publicScripts> <name>listQueryText.xq</name> </publicScripts> </config>
The script checks that a requested script name is present in the list of public scripts before retrieving the script.