Well spotted!

I used this expression to test and upload files in the modules database from an 
AppServer that was NOT connected to the Modules database itself. So I guess it 
would be safest to check xdmp:modules-database() to return a value and only use 
xdmp:database('Modules') if it doesn't.

On the other hand, that is not usefull when only testing presence of modules, 
that need to be called from the same AppServer without lots of fuss.. ;-)

Cheers

>


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - 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
> Wayne Feick
> Sent: maandag 9 februari 2009 20:05
> To: General Mark Logic Developer Discussion
> Subject: RE: [MarkLogic Dev General] uri-is-file for modules
> in database
>
> A slight improvement on the code below would be to use
> xdmp:modules-database() instead of xdmp:database('Modules')
> so the code will work with whatever your current modules
> database is, regardless of what its name might be.
>
> Wayne.
>
>
> On Mon, 2009-02-09 at 16:30 +0100, Geert Josten wrote:
>
>
>       Erik,
>
>       Xquery files are stored just like other files, but in a
> different database. Try using something like:
>
>         xdmp:eval(
>           '
>             boolean(doc("here.xqy"))
>           ',
>           (),
>           <options xmlns="xdmp:eval">
>             <database>{xdmp:database('Modules')}</database>
>           </options>)
>
>       Mind though, the user executing the eval needs to have
> eval privileges..
>
>       Kind regards,
>       Geert
>
>
>
>

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to