XQuery Extension Modules Documentation

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 extensions" or "%EXIST_HOME%\build.bat extensions"

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().

1. Example Module

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: Wolfgang Meier
Licence: LGPL
Status: production

Class: org.exist.xquery.modules.example.ExampleModule
Namespace: http://exist-db.org/xquery/examples

2. Image Module

This modules provides operations on images stored in the db, including: Retreiving Image Dimensions, Creating Thumbnails and Resizing Images.

Creator: Adam Retter
Contributors: Wolfgang Meier
Licence: LGPL
Status: production

Class: org.exist.xquery.modules.image.ImageModule
Namespace: http://exist-db.org/xquery/image

3. Mail Module

This modules provides facilities for sending text and/or HTML emails from XQuery using either SMTP or a local Sendmail binary.

Creator: Adam Retter
Licence: LGPL
Status: production

Class: org.exist.xquery.modules.mail.MailModule
Namespace: http://exist-db.org/xquery/mail

4. Simple Query Language Module

This modules implements a Simple custom Query Language which is then converted to XPath and executed against the db.

Creator: Wolfgang Meier
Licence: LGPL
Status: production

Class: org.exist.xquery.modules.simpleql.SimpleQLModule
Namespace: http://exist-db.org/xquery/simple-ql

5. SQL Module

This modules provides facilities for performing SQL operations against traditional databases from XQuery and returning the results as XML nodes.

Creator: Adam Retter
Licence: LGPL
Features Used: JDBC
Status: production

Class: org.exist.xquery.modules.sql.SQLModule
Namespace: http://exist-db.org/xquery/sql

6. XML Differencing Module

This module provides facilities for determining the differences between XML nodes.

Creator: Dannes Wessels
Contributors: Pierrick Brihaye
Licence: LGPL
Status: production

Class: org.exist.xquery.modules.xmldiff.XmlDiffModule
Namespace: http://exist-db.org/xquery/xmldiff

7. Math Module

This module provides mathematical functions from the java Math class.

Creator: Dannes Wessels
Licence: LGPL
Status: production

Class: org.exist.xquery.modules.math.MathModule
Namespace: http://exist-db.org/xquery/math