eXist Module


NOTE: The eXist module is currently in PRE-ALPHA stage. For testing only. Do not use in production environements !


Connectivity to a eXist-db server is supported with an extension module.

eXist support is via an Extension Module. It must be downloaded separately from xmlsh and imported to run.

Download

eXist extension module is on sourceforge in the exist_ext package under xmlsh.
Dowload the latest binary from xmlsh files
Choose the "exist_ext" folder and download the latest release.


Dependancies

The current eXist extension (0.4) requires xmlsh version 1.1.8 or greater.


Installing

Like all extension modules you must install the files under bin/ into a directory under $XMODPATH
Suggested is to use $XMODPATH/exist and it should contain only the files from the bin/ directory (module.xml, exist_ext.jar)


Importing


Import the eXist extension in xmlsh with an "import module" statement.
The module can be found using the XMODPATH variable or explicitly by specifying the module.xml file

Copy the files in the "bin" direcectory to a directory named "exist" as a sub-directory of any path in the XMODPATH directory.
Then import the module using the "import module" command

Assuming you put the eXist files in the directory /usr/local/xmlsh/ext/exist

   XMODPATH=/usr/local/xmlsh/ext
   import module e=exist





Configuring


To run eXist commands you need to configure the connection information to access your eXist-db server. All exist commands require a connection string, and optional authentication and connection related parameters.

The connection string and (optional) authentication can be supplied via command line arguments or environment variables.
The examples shown assume environment variables.

Supported eXist Environment variables

NameMeaningExample
EXIST_CONNECTConnection URL to REST protocol on your eXist serverhttp://localhost:8080/exist/rest
EXIST_USERUsernameadmin
EXIST_PASSWORDPasswordmypass


Example
$ EXIST_CONNECT=http://localhost:8080/exist/rest


Instead of using an environment variable, you can also pass in the connection URI as a command argument using -c or -connect, the username via -user and the password via -password.


Example
e:query -c http://localhost:8080/exist/rest -q "'Hello World'"


Common Parameters

All eXist commands support a set of common command arguments. These are detailed in eXist Common Options


Running

Your now ready to run eXist commands from within xmlsh.

The following commands are supported

delDeletes a resource
getGets a resource
invokeInvokes a stored query
putPuts (stores) a resource.
queryInvokes an 'ad-hoc' query
listLists contents of a collection



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