Install the Transformation Module
This section walks you through installing the transform module(s) created in Create the XQuery Transformation Module or Create the JavaScript Transformation Module.
These instructions assume you use the XDBC App Server and Documents database pre-configured on port 8000. This procedure installs the module using Query Console. You can use another method.
For more detailed instructions on using Query Console, see the Query Console User Guide.
Navigate to Query Console in your browser:
http://yourhost:8000/qconsole/
Create a new query by clicking the "+" at the top of the query editor.
Select XQuery in the Query Type dropdown.
Install the XQuery and/or JavaScript module by copying one of the following scripts into the new query. Modify the first parameter of
xdmp:document-load
to match the path to the transform module you previously created.To install the XQuery module, use the following script:
xquery version "1.0-ml"; xdmp:document-load("/space/mlcp/txform/transform.xqy", <options xmlns="xdmp:document-load"> <uri>/example/mlcp-transform.xqy</uri> <repair>none</repair> <permissions>{xdmp:default-permissions()}</permissions> </options>)
To install the JavaScript module, use the following script:
xquery version "1.0-ml"; xdmp:document-load("/space/mlcp/txform/transform.sjs", <options xmlns="xdmp:document-load"> <uri>/example/mlcp-transform.sjs</uri> <repair>none</repair> <permissions>{xdmp:default-permissions()}</permissions> </options>)
Select the modules database of your XDBC App Server in the Content Source dropdown at the top of the query editor. If you use the XDBC App Server on port 8000, this is the database named Modules.
Click the Run button. Your module is installed in the modules database.
To confirm installation of your module, click the Explore button at the top of the query editor and note your module installed with URI
/example/mlcp-transform.xqy
or/example/mlcp-transform.sjs
.