eXist has a large number of extension modules built in that allow you to do lots of wonderful things that you can’t do with straight XQuery, such as manipulating the database’s content, inspecting an HTTP request, encrypting/decrypting data, and performing XSLT transformations. This chapter will provide you with an overview of the module mechanism in general. An overview of the available modules can be found in Appendix A.
Extension modules come in two flavors, which you need to be aware of because they behave differently in eXist. The module descriptions in Extension Module Descriptions will tell you the module type. We will also explain how to find out the module type yourself in “Enabling Extension Modules”.
Extension modules written in Java are fully integrated into eXist. You don’t even have
to put an
statement in your XQuery code to be able to use them. Most of the eXist
core functionality you use regularly is Java-backed (e.g.,
For instance, when you want to find out the eXist home directory
system:get-exist-home, you can simply do this
in your code without an
statement for the
However, it is generally considered good practice to have this
explicitly set out, so you may choose to add, for example:
import module namespace system="http://exist-db.org/xquery/system";
Not all of the available Java ...