[MarkLogic Dev General] Set the Modules and Documents DB to be
lists at fgeorges.org
Mon Sep 8 09:39:32 PDT 2008
Danny Sokolsky wrote:
First, many thanks for your detailed answer, Danny.
> This is an error in the doc. That should say "HTTP Server"
> instead of "WebDAV server".
Ah, ok. Now I've been able to set both Modules and
Documents databases on the HTTP server. But...
> 1. Create an HTTP Server and configure it as follows:
> a) Set the Modules database to be the same database as the
> Documents database. For example, if the database setting is
> set to the database named "my-database", set the modules
> database to "my-database" as well.
Ok. I've set both of them to the default-created Documents
> b) Set the HTTP Server root to http://myDirectory/, or set
> the root to another value and modify the $rootdir variable
> in the directory browser code so it matches your HTTP
> Server root.
I followed what was done for the default-created HTTP
server (Docs on 8000), and put "Tmp/" as the value of the
field "root" in the form to create a new HTTP server. The
server name is also "Tmp".
I am not sure what you mean with "http://myDirectory/". I
guess you mean to put "myDirectory" in the "root" field?
> c) Set the port to 9001, or to a port number not currently
> in use.
Set to 8003.
> 2) Copy the sample code into a file named browser.xqy. If
> needed, modify the $rootdir variable to match your HTTP
> Server root. Using the xdmp:modules-root function, as in
> the sample code, will automatically get the value of the
> App Server root.
> 3) Load the browser.xqy file into the Modules database at
> the top level of the HTTP Server root. For example, if the
> HTTP Server root is http://myDirectory/, load the
> browser.xqy file into the database with the URI
> http://myDirectory/browser.xqy. You can load the document
> either via a WebDAV client (if you also have a WebDAV
> server pointed to this root) or with the xdmp:document-load
I tried both using the "Load" tab on the database in the
admin console, and using xdmp:document-load() like this:
(: Tmp/ is the root of the HTTP server :)
But I am not able to get it back. I tried both doc() and
xdmp:document-get() (with "Tmp/browser.xq".) In both cases
the document doesn't exist.
I evaluated this call in CQ. Because CQ has to be
installed on the disk and the Modules database of this HTTP
server as to be a real database, CQ cannot be installed on
the same HTTP server (my CQ is installed on the default HTTP
server installed on 8000.) I am not aware of any other
builtin way to evaluate an XQuery.
I think I am a bit lost between the document's URIs, the
servers and the databases :-(
Do you see something wrong?
More information about the General