[MarkLogic Dev General] document name function

2011-06-03 Thread Gary Larsen
If there an xQuery function to return the document name? fn:document-uri(xdmp:directory('/db/netvisn/global/analysis/result/', 'infinity')) returns /db/netvisn/global/analysis/result/98bbdd41-34b9-45d3-833e-4afe65fb9ec3.xml But what I need is

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread G. Ken Holman
At 2011-06-03 11:05 -0400, Gary Larsen wrote: If there an xQuery function to return the document name? fn:document-uri(xdmp:directory('/db/netvisn/global/analysis/result/', 'infinity')) returns /db/netvisn/global/analysis/result/98bbdd41-34b9-45d3-833e-4afe65fb9ec3.xml But what I need is

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread Damon Feldman
Gary, The full URI is really the document name. If you want the last bit of the URI after the final / you can use tokenize(/a/b/c/d.x, /)[last()] if you want the path after your directory, use substring-after($uri, $dirname) Yours, Damon From: general-boun...@developer.marklogic.com

[MarkLogic Dev General] Integrating marklogic with apache

2011-06-03 Thread Carmen Cojocaru
Hello all, I have some difficulties in integrating marklogic with the apache web-server and I thought I could ask for your help.The instructions I've been following belong to http://developer.marklogic.com/learn/2004-09-cisapache . What I did is adding a few lines in the httpd.conf file so

[MarkLogic Dev General] Integrating marklogic with apache

2011-06-03 Thread Carmen Cojocaru
Hello all, I have some difficulties in integrating marklogic with the apache web-server and I thought I could ask for your help.The instructions I've been following belong to http://developer.marklogic.com/learn/2004-09-cisapache . What I did is adding a few lines in the httpd.conf file so

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread Gary Larsen
The regex solution worked great! Thanks -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of G. Ken Holman Sent: Friday, June 03, 2011 11:05 AM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread G. Ken Holman
At 2011-06-03 12:11 -0400, you wrote: The regex solution worked great! I'm glad! But I like Damon's suggestion of using tokenize() better: At 2011-06-03 08:08 -0700, Damon Feldman wrote: If you want the last bit of the URI after the final / you can use tokenize(/a/b/c/d.x, /)[last()] I wish I

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread Keith L. Breinholt
There are also some utility functions that return the path or the filename. import module namespace util = http://marklogic.com/xdmp/utilities; at /MarkLogic/utilities.xqy; let $someurl := /db/netvisn/global/analysis/result/98bbdd41-34b9-45d3-833e-4afe65fb9ec3.xml util:basename( $someurl )

Re: [MarkLogic Dev General] document name function

2011-06-03 Thread Gary Larsen
tokenize() is working. Thanks all! gary -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of G. Ken Holman Sent: Friday, June 03, 2011 12:16 PM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic

[MarkLogic Dev General] specifying path while importing module using cq

2011-06-03 Thread Ankur Acharya
Disclaimer: This might be a very naive question to most of the readers. I'm trying to import a module using the following code: ... import module namespace conf = http://foo.com/lib/config; at /lib/config.xqy; ... When I copy it to the C:\ drive and rephrase the code to: ... import module

Re: [MarkLogic Dev General] Integrating marklogic with apache

2011-06-03 Thread David Lam
On Fri, Jun 3, 2011 at 8:44 AM, Carmen Cojocaru carmenn.cojoc...@yahoo.comwrote: Hello all, I have some difficulties in integrating marklogic with the apache web-server and I thought I could ask for your help.The instructions I've been following belong to