Hi Wyatt,

MarkLogic has no concept of what you describe as an application level
variable.  Depending upon what you want to use it for, you could of
course achieve this by storing the information in a document in the
database--then it would always be accessible to applications.

You are indeed correct that the return type of xdmp:get-session-field is
an item()*, nos a string as the doc says.  Also, it would make sense for
the second parameter to take an item()* since that is what it returns.
Thanks for pointing those things out, and I'll take them up with
engineering.

Thanks,
-Danny

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wyatt
Sent: Friday, December 15, 2006 10:45 AM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] Application (and session) variables???


Is there such thing as an application level variable in MLS?  Something 
that can be created when MLS starts and is resident in memory all the 
time?  I've looked around the documentation and can't anything, am I'm 
missing something?

On a side note, I've been using session variables in lieu of application

variables and found some inaccuracies in the documentation for 
xdmp:get-sesssion-field() function...  The documentation says it returns

a xs:string, but I believe it returns an item().  When I store an 
element() with xdmp:set-session-field(), I get an element() from 
xdmp:get-session-field().  It would also be nice if the default (2nd) 
parameter of xdmp:get-session-field() would take an item rather than an 
xs:string.

Thanks

Wyatt


_______________________________________________
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