<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: extensions.xml 18708 2013-07-15 20:40:01Z dizzzz $ --><book xmlns:dc="http://purl.org/dc/elements/1.1/"><bookinfo><productname>eXist-db – Open Source Native XML Database</productname><title>XQuery Extension Modules Documentation</title><date>August 2012</date><author><firstname>Adam</firstname><surname>Retter</surname><affiliation><address format="linespecific"><email>adam dot retter at devon.gov.uk</email></address></affiliation></author><author><firstname>Pierrick</firstname><surname>Brihaye</surname><affiliation><address format="linespecific"><email>pierrick dot brihaye at culture dot gouv dot fr</email><email>pierrick dot brihaye at region dash bretagne dot fr</email></address></affiliation></author><author><firstname>Loren</firstname><surname>Cahlander</surname><affiliation><address format="linespecific"><email>loren at syntactica.com</email></address></affiliation></author><author><firstname>James</firstname><surname>Fuller</surname><affiliation><address format="linespecific"><email>jim dot fuller at webcomposite.com</email></address></affiliation></author><author><firstname>Leif-Jöran</firstname><surname>Olsson</surname><affiliation><address format="linespecific"><email>ljo at exist-db.org</email></address></affiliation></author></bookinfo><chapter><title>XQuery Extension Modules Documentation</title><para>eXist-db 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 database, its internal API,
      the context of the executing XQuery and the HTTP Session (if appropriate).</para><para>The source code for extension modules should be placed in their own folder inside
        <filename>$EXIST_HOME/extensions/modules/src/org/exist/xquery/modules</filename>. They may
      then be compiled in place using either <command>$EXIST_HOME/build.sh
        extension-modules</command> or <command>%EXIST_HOME%\build.bat extension-modules</command>
      depending on the platform.</para><para>Modules associated to modularized indexes should be placed in the
        <filename>$EXIST_HOME/extensions/indexes/*/xquery/modules/*</filename> hierarchy. They will
      be compiled automatically by the standard build targets or as indicated above.</para><para>eXist-db must also be told which modules to load, this is done in
        <filename>conf.xml</filename> and the Class name and Namespace for each module is listed
      below. Note – eXist-db will require a restart to load any new modules added. Once a Module is configured
      and loaded eXist-db will display the module and its function definitions as part of the <ulink url="{fundocs}">function library</ulink> page or through
        <command>util:decribe-function()</command>.</para><section id="module_example"><title>Example Module</title><para>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.</para><para><command>Creator:</command>&#160;<dc:creator>Wolfgang Meier</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.example.ExampleModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/examples </para></section><section id="module_cache"><title>Cache Module</title><para>Provides a global key/value cache</para><para><command>Creator:</command>&#160;<dc:creator>Evgeny Gazdovsky</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.cache.CacheModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/cache </para></section><section id="module_compression"><title>Compression Module</title><para>Provides additional operations for compression</para><para><command>Creator:</command>&#160;<dc:creator>Adam Retter</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.compression.CompressionModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/compression </para></section><section id="module_context"><title>Context Module</title><para>Provides access to XQuery contexts, local attributes and foreign contexts for simple
        inter-XQuery communication. This extension is experimental at this time and has side effects
        (eg. not purely functional in nature). Use at own risk! </para><para><command>Creator:</command>&#160;<dc:creator>Andrzej Taramina</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;experimental </para><para><command>Class:</command>&#160;org.exist.xquery.modules.context.ContextModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/context </para></section><section id="module_datetime"><title>Date Time Module</title><para>Provides additional operations on date and time types</para><para><command>Creator:</command>&#160;<dc:creator>Adam Retter</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.datetime.DateTimeModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/datetime </para></section><section id="module_exi"><title>EXI Module</title><para>Provides additional operations to encode and decode Efficient XML Interchange format (EXI)</para><para><command>Creator:</command>&#160;<dc:creator>Robert Walpole</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.exi.EXIModule
        <command>Namespace:</command>&#160;http://exist-db.org/xquery/exi </para></section><section id="module_file"><title>File Module</title><para>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!</para><para><command>Creator:</command>&#160;<dc:creator>Andrzej Taramina, Chaeron
          Corporation</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.file.FileModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/file </para></section><section id="module_httpclient"><title>HTTP Client Module</title><para>Functions for performing HTTP requests</para><para><command>Creator:</command>&#160;<dc:creator>Adam Retter and Andrzej Taramina</dc:creator><command>Licence:</command>&#160;LGPL <command>Features Used:</command>&#160;NekoHTML
          <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.http.HTTPClientModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/httpclient </para></section><section id="module_image"><title>Image Module</title><para>This modules provides operations on images stored in the db, including: Retreiving Image
        Dimensions, Creating Thumbnails and Resizing Images.</para><para><command>Creator:</command>&#160;<dc:creator>Adam Retter</dc:creator><command>Contributors:</command>&#160;<dc:contributor>Wolfgang
          Meier</dc:contributor>,&#160;<dc:contributor>Rafael Troilo</dc:contributor><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.image.ImageModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/image </para></section><section id="module_jndi"><title>JNDI Directory Module</title><para> 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-db/XQuery based application.</para><para>To compile it, set the parameter include.module.jndi = true in
        $EXIST_HOME/extensions/local.build.properties file (create it if missing).</para><para>Then, to enable it, edit the appropriate module entry in conf.xml</para><para><command>Creator:</command>&#160;<dc:creator>Andrzej Taramina, Chaeron
          Corporation</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.jndi.JNDIModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/jndi </para></section><section id="module_mail"><title>Mail Module</title><para>This modules provides facilities for sending text and/or HTML emails from XQuery using
        either SMTP or a local Sendmail binary.</para><para><command>Creator:</command>&#160;<dc:creator>Adam Retter</dc:creator><command>Contributors:</command>&#160;<dc:contributor>Robert Walpole</dc:contributor><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.mail.MailModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/mail </para></section><section id="module_math"><title>Math Module</title><para>This module provides mathematical functions from the java Math class.</para><para><command>Creator:</command>&#160;<dc:creator>Dannes Wessels</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.math.MathModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/math </para></section><section id="module_oracle"><title>Oracle Module</title><para>This module allows execution of PL/SQL Stored Procedures within an Oracle RDBMS from
        XQuery and returns the results as XML nodes. This module should be used where an Oracle
        database returns results in an Oracle REF_CURSOR and can only be used in conjunction with
        the SQL extension module.</para><para><command>Creator:</command>&#160;<dc:creator>Rob Walpole</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.oracle.OracleModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/oracle </para></section><section id="module_scheduler"><title>Scheduler Module</title><para>Provides access to eXist-db's Scheduler for the purposes of scheduling job's and
        manipulating existing job's.</para><para><command>Creator:</command>&#160;<dc:creator>Adam Retter</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.scheduler.SchedulerModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/scheduler </para></section><section id="module_simpleql"><title>Simple Query Language Module</title><para>This modules implements a Simple custom Query Language which is then converted to XPath
        and executed against the db.</para><para><command>Creator:</command>&#160;<dc:creator>Wolfgang Meier</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.simpleql.SimpleQLModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/simple-ql </para></section><section id="module_spatial"><title>Spatial module</title><para>Various functions for <ulink url="http://www.opengeospatial.org/standards/gml">GML</ulink> geometries, whether indexed or not. More information about the design is
        available <ulink url="devguide_indexes.xml">here</ulink>.</para><para><command>Creator:</command>&#160;<dc:creator>Pierrick Brihaye</dc:creator><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;experimental </para><para><command>Class:</command>&#160;org.exist.xquery.modules.spatial.SpatialModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/spatial </para></section><section id="module_sql"><title>SQL Module</title><para>This module provides facilities for performing SQL operations against traditional
        databases from XQuery and returning the results as XML nodes.</para><para><command>Creator:</command>&#160;<dc:creator>Adam Retter</dc:creator><command>Licence:</command>&#160;LGPL <command>Features Used:</command>&#160;JDBC
          <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.sql.SQLModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/sql </para></section><section id="module_xmldiff"><title>XML Differencing Module</title><para>This module provides facilities for determining the differences between XML
        nodes.</para><para><command>Creator:</command>&#160;<dc:creator>Dannes Wessels</dc:creator><command>Contributors:</command>&#160;<dc:contributor>Pierrick Brihaye</dc:contributor><command>Licence:</command>&#160;LGPL <command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.xmldiff.XmlDiffModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/xmldiff </para></section><section id="module_xslfo"><title>XSL-FO Module</title><para>This module provides XSL-FO rendering facilities.</para><para><command>Creator:</command>&#160;<dc:creator><ulink url="http://www.uwe.ac.uk">University of the West of England</ulink></dc:creator><command>Licence:</command>&#160;LGPL <command>Features Used:</command>&#160;<ulink url="http://xmlgraphics.apache.org/fop/">Apache FOP</ulink><command>Status:</command>&#160;production </para><para><command>Class:</command>&#160;org.exist.xquery.modules.xslfo.XSLFOModule
          <command>Namespace:</command>&#160;http://exist-db.org/xquery/xslfo </para></section><section id="module_xprocxq"><title>XProcxq Module</title><para>This module provides XProc functionality to eXist-db.</para><para><command>Creator:</command>&#160;<dc:creator><ulink url="http://www.webcomposite.com">James R. Fuller</ulink></dc:creator><command>Licence:</command>&#160;MPL v1.1 <command>Features Used:</command>&#160;<ulink url="http://www.expath.org">expath http library</ulink><command>Status:</command>&#160;in development for v2.0 release </para><para><command>Class:</command>&#160;static xquery module via extensions/xprocxq.jar
          <command>Namespace:</command>&#160;http://xproc.net/xproc </para></section><section id="module_xmlcalabash"><title>XML Calabash Module</title><para>This module provides simple integration with XML Calabash XProc engine.</para><para><command>Creator:</command>&#160;<dc:creator><ulink url="http://www.webcomposite.com">James R. Fuller</ulink></dc:creator><command>Licence:</command>&#160;MPL v1.1 </para><para><command>Class:</command>&#160;org.exist.xquery.modules.xmlcalabash
          <command>Namespace:</command>&#160; http://xmlcalabash.com </para></section></chapter></book>