Last modified on 15 March 2010, at 23:17

XQuery/Registered Modules

MotivationEdit

You want to check to see if an module is loaded in your runtime systems.

MethodEdit

Some modules that you may need are not loaded into the runtime engine when the server starts. If this is the case you may have to dynamically load a module.

Listing current modules in the runtimeEdit

xquery version "1.0";
 
let $modules := util:registered-modules()
return
<results>{
   for $module in $modules
   order by $module
   return
      <module>{ $module}</module>
   }
</results>

Run

Sample ResultsEdit

<results>
    <module>http://exist-db.org/xquery/compression</module>
    <module>http://exist-db.org/xquery/datetime</module>
    <module>http://exist-db.org/xquery/examples</module>
    <module>http://exist-db.org/xquery/file</module>
    <module>http://exist-db.org/xquery/httpclient</module>
    <module>http://exist-db.org/xquery/image</module>
    <module>http://exist-db.org/xquery/mail</module>
    <module>http://exist-db.org/xquery/math</module>
    <module>http://exist-db.org/xquery/ngram</module>
    <module>http://exist-db.org/xquery/request</module>
    <module>http://exist-db.org/xquery/response</module>
    <module>http://exist-db.org/xquery/scheduler</module>
    <module>http://exist-db.org/xquery/session</module>
    <module>http://exist-db.org/xquery/sql</module>
    <module>http://exist-db.org/xquery/system</module>
    <module>http://exist-db.org/xquery/text</module>
    <module>http://exist-db.org/xquery/transform</module>
    <module>http://exist-db.org/xquery/util</module>
    <module>http://exist-db.org/xquery/validation</module>
    <module>http://exist-db.org/xquery/xmldb</module>
    <module>http://exist-db.org/xquery/xmldiff</module>
    <module>http://www.w3.org/2005/xpath-functions</module>
</results>