Revision [480]

This is an old revision of ModuleMarkLogic made by DavidLee on 2009-04-20 17:32:48.

 

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_ext package under xmlsh.
Dowload the latest binary from marklogic_ext package

You also need the "xcc.jar" file from Mark Logic Developer Page (the Java XCC Distribution)

Installation


Place marklogic_ext.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_ext.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 the connection information to access your Mark Logic 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

Note: the Port is the port number of an XDBC "Host" defined on the Mark Logic server.

Example
$ MLCONNECT=xcc://me:password@server:8003/Test


Instead of using an environment variable, you can also pass in the connection URI as a command argument using -c or -connect

Example
$ ml:query -c xcc://me:password@server:8003/Test -q "'Hello World'"


Running

Your now ready to run Mark Logic commands from within xmlsh.

The following commands are supported


Extension Modules

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki