Hi folks,

I've been playing around with some content I loaded into an instance of
MarkLogic Server (3.1.4), and I ran into a URI issue which I'm finding
slightly perplexing.  What is the root 'scheme' used by MarkLogic when
a document is loaded using a path like '/foo'?

The reason I ask is that I've got an XDBC app-server set up to serve
the Documents database for an MLS instance, and I've got a file I
loaded using the path

  /a.xml

which has inside of it

  <reference href="b.xml"/>

I find that calling

for $ref in doc('/a.xml')//reference
return
  resolve-uri($ref/@href, base-uri($ref))

returns an error

  XDMP-RELURIBASEARG: resolve-uri("b.xml", "/a.xml") -- Relative URI base 
argument to resolve-uri

This surprises me, as I thought the entire point of base-uri was to
return the ... well, base, something that resolve-uri can consume.
I'm probably misunderstanding something about how this is supposed to
be used, but I had assumed fn:base-uri would return something 'fully
qualified' given that the context it was passed was froma file loaded
via doc.

Should I be:

  Using a different type of path when loading files?
  Setting a base in the module prolog?
  Reading some documentation I've managed to overlook? :(

Jim

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
James A. Robinson                       [EMAIL PROTECTED]
Stanford University HighWire Press      http://highwire.stanford.edu/
+1 650 7237294 (Work)                   +1 650 7259335 (Fax)
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to