O'Reilly logo

eXist by Adam Retter, Erik Siegel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Extension Modules

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.

Types of Extension Modules

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

Extension modules written in Java are fully integrated into eXist. You don’t even have to put an import module 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., xmldb, request, transform, response, and util).

For instance, when you want to find out the eXist home directory by calling system:get-exist-home, you can simply do this in your code without an import module statement for the system module. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required