[MarkLogic Dev General] uri-is-file for modules in database
Erik Peterson
petersones at ldschurch.org
Mon Feb 9 07:13:24 PST 2009
We have an HTTP App server using modules database and a separate
content database. We need determine if certain xqy file exists prior
to invoking it from within another xqy file. When xqy files were
stored in the file system the xdmp:uri-is-file() function worked fine.
Now that modules are stored in the database we've been unable to
determine file existence.
Below is a simple example of a here.xqy file that cannot determine its
own existence, all function calls return false. Note that the file
exists in the /code/myapp folder and the http root is mapped to that
folder:
Thanks,
Erik
----------------------------------------------------------------
xquery version "1.0-ml";
"--- uri-is-file",
"-here.xqy",
xdmp:uri-is-file("here.xqy"),
"-/here.xqy",
xdmp:uri-is-file("/here.xqy"),
"-code/conference/here.xqy",
xdmp:uri-is-file("code/myapp/here.xqy"),
"-/code/conference/here.xqy",
xdmp:uri-is-file("/code/myapp/here.xqy"),
"---doc-available",
"-here",
fn:doc-available("here.xqy"),
"-/here",
fn:doc-available("/here.xqy")
----------------------------------------------------------------
NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090209/9a9bf243/attachment.html
More information about the General
mailing list