eXist provides a pluggable module interface that allows extension modules to be easily developed in Java. These extension modules can provide additional XQuery functions through a custom namespace. The extension modules have full access to the eXist db, its internal API, the context of the executing XQuery and the HTTP Session (if appropriate).
The source code for extension modules should be placed in their own folder inside $EXIST_HOME/extensions/modules/src/org/exist/xquery/modules. They may then be compiled in place using either $EXIST_HOME/build.sh extension-modules or %EXIST_HOME%\build.bat extension-modules depending on the platform.
Modules associated to modularized indexes should be placed in the $EXIST_HOME/extensions/indexes/*/xquery/modules/* hierarchy. They will be compiled automatically by the standard build targets or as indicated above.
eXist must also be told which modules to load, this is done in conf.xml and the Class name and Namespace for each module is listed below. Note - eXist will require a restart to load the new module. Once a Module is configured and loaded eXist will display the module and its function definitions as part of the function library page or through util:decribe-function().
Demonstrates the simplest example of an Extension module with a single function. A good place to start if you wish to develop your own Extension Module.
Creator:
Class: org.exist.xquery.modules.example.ExampleModule Namespace: http://exist-db.org/xquery/examples
Provides additional operations for compression
Creator:
Class: org.exist.xquery.modules.compression.CompressionModule Namespace: http://exist-db.org/xquery/compression
Provides additional operations on date and time types
Creator:
Class: org.exist.xquery.modules.datetime.DateTimeModule Namespace: http://exist-db.org/xquery/datetime
Provides additional operations on files and directories. WARNING: Enabling this extension module could result in possible security issues, since it allows writing to the filesystem by xqueries!
Creator:
Class: org.exist.xquery.modules.file.FileModule Namespace: http://exist-db.org/xquery/file
Functions for performing HTTP requests
Creator:
Class: org.exist.xquery.modules.http.HTTPClientModule Namespace: http://exist-db.org/xquery/httpclient
This modules provides operations on images stored in the db, including: Retreiving Image Dimensions, Creating Thumbnails and Resizing Images.
Creator:
Class: org.exist.xquery.modules.image.ImageModule Namespace: http://exist-db.org/xquery/image
This extension module allows you to access and manipulate JNDI-based directories, such as LDAP, using XQuery functions. It can be very useful if you want to integration and LDAP directory into an eXist/XQuery based application.
To compile it, set the parameter include.module.jndi = true in $EXIST_HOME/extensions/modules/build.properties file.
Then, to enable it, edit the appropriate module entry in conf.xml
Creator:
Class: org.exist.xquery.modules.jndi.JNDIModule Namespace: http://exist-db.org/xquery/jndi
This modules provides facilities for sending text and/or HTML emails from XQuery using either SMTP or a local Sendmail binary.
Creator:
Class: org.exist.xquery.modules.mail.MailModule Namespace: http://exist-db.org/xquery/mail
This module provides mathematical functions from the java Math class.
Creator:
Class: org.exist.xquery.modules.math.MathModule Namespace: http://exist-db.org/xquery/math
Provides access to eXist's Scheduler for the purposes of scheduling job's and manipulating existing job's.
Creator:
Class: org.exist.xquery.modules.scheduler.SchedulerModule Namespace: http://exist-db.org/xquery/scheduler
This modules implements a Simple custom Query Language which is then converted to XPath and executed against the db.
Creator:
Class: org.exist.xquery.modules.simpleql.SimpleQLModule Namespace: http://exist-db.org/xquery/simple-ql
Various functions for GML geometries, whether indexed or not. More information about the design is available here.
Creator:
Class: org.exist.xquery.modules.spatial.SpatialModule Namespace: http://exist-db.org/xquery/spatial
This module provides facilities for performing SQL operations against traditional databases from XQuery and returning the results as XML nodes.
Creator:
Class: org.exist.xquery.modules.sql.SQLModule Namespace: http://exist-db.org/xquery/sql
This module provides facilities for determining the differences between XML nodes.
Creator:
Class: org.exist.xquery.modules.xmldiff.XmlDiffModule Namespace: http://exist-db.org/xquery/xmldiff
This module provides XSL-FO rendering facilities.
Creator:
Class: org.exist.xquery.modules.xslfo.XSLFOModule Namespace: http://exist-db.org/xquery/xslfo
This module provides XProc functionality to eXist.
Creator:
Class: static xquery module via extensions/xprocxq.jar Namespace: http://xproc.net/xproc