Hi Helen,

It looks like it is not possible. When accessing MarkLogic Server through an 
XDBC server there is no request information. That is only available when 
accessing through an HTTP server. Likewise I expect xdmp:set-response-code not 
to work either with XDBC servers. There is simply no HTTP request, nor an HTTP 
response..

Kind regards,
Geert

>


drs. G.P.H. (Geert) Josten
Consultant


Daidalos BV
Hoekeindsehof 1-4
2665 JZ Bleiswijk

T +31 (0)10 850 1200
F +31 (0)10 850 1199

mailto:[email protected]
http://www.daidalos.nl/

KvK 27164984

P Please consider the environment before printing this mail.
De informatie - verzonden in of met dit e-mailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.

> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Helen Chen
> Sent: woensdag 17 februari 2010 15:42
> To: General Mark Logic Developer Discussion
> Cc: Helen Chen
> Subject: [MarkLogic Dev General] how to get xquery module full path?
>
> I connect to marklogic through XDBC server,  the root for
> this server
> is   /mydir/myroot     and it use file system as module
>
> on file system, the xquery code is in  /mydir/myroot/test/myxqy/a.xqy
>
> this structure is for switching directory around, so I can have
> different versions like
> /test/myxqy/a.xqy
> /dev1/myxqy/a.xqy
> /dev2/myxqy/a.xqy
>
> inside a.xqy, I want to know the file system path, like I
> want to know
> a.xqy is from /test/myxqy/a.xqy, not from /dev1/myxqy/a.xqy
>
> I tried to put code inside a function in a.xqy like
>
> (
>    xdmp:log( fn:concat( "the request path is: ", xdmp:get-request-
> path()) )
>   ,
>    xdmp:log( fn:concat( "the root path is: ", xdmp:modules-root() ) )
> )
>
>
> and I run it through XDBC server, I can get  the root path
> is: /mydir/
> myroot, but the request path is empty, I think I used the
> wrong method.
>
> How can I get the path of /test/myxqy/a.xqy  inside a.xqy code?
>
> Thanks, Helen
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to