Revision [463]
This is an old revision of ModuleMarkLogic made by DavidLee on 2009-04-10 16:14:19.
Mark Logic Module
Connectivity to a Mark Logic server is supported with an extension module.
Mark Logic support is via an Extension Module. It must be downloaded separately from xmlsh and added to the classpath in order to run.
Download
Mark Logic extension module is on sourceforge in the marklogic package under xmlsh.Dowload the latest binary from marklogic package
You also need the "xcc.jar" file from Mark Logic Developer Page (the Java XCC Distribution)
Installation
Place marklogic.jar and xcc.jar in a known directory and edit the CLASSPATH used for launching xmlsh.
This can be done by editing the win32\xmlsh.bat or unix/xmlsh startup scripts or whatever command is used to launch xmlsh.
Windows example, assuming marklogic.jar and xcc.jar are placed in the same directory as xmlsh.jar (%XMLSH%\lib) edit win32\xmlsh.bat and add before the java command
@set CLASSPATH=%CLASSPATH%;%XMLSH%\lib\marklogic.jar @set CLASSPATH=%CLASSPATH%;%XMLSH%\lib\xcc.jar
Importing
Now you can startup xmlsh but you must import the extension module in order to use it.
Its recommended that you use a prefix for the import. The marklogic package is org.xmlsh.marklogic. To import the module using the "ml" prefix do the following.
$ import module ml=org.xmlsh.marklogic
Configuring
To run Mark Logic commands you need to configure your server. All the Mark Logic commands require an environment variable, MLCONNECT to specify the connection. The format is the URI used by the XCC API.
xcc://user:password@host:port/Database
Example
$ MLCONNECT=xcc://me:password@server:8003/Test
Running
Your now ready to run Mark Logic commands from within xmlsh.The following commands are supported
Extension Modules