In XQuery you use external variables to send
information to a module. In your XQuery, you do
something like:
xquery version "1.0-ml";
declare variable $doc-uri as xs:string external;
fn:doc ($doc-uri)
In XCC, you set external variables on a Request
object before submitting it. Request is an interface
that is implemented by AdhocQuery, ModuleInvoke and
ModuleSpawn. See the JavaDoc for Request at:
http://developer.marklogic.com/pubs/4.2/javadoc/index.html
When invoking or eval'ing a module from within
XQuery, you set external variables via a parameter
on xdmp:eval, xdmp:invoke or xdmp:spawn.
The XCC setOptions method is for things that are
meta to the request, such as time limits and buffering
options.
On Mar 17, 2011, at 6:23 AM, ambika arumugam wrote:
> Hi all
> I am able to connect to Marklogic server with the XCC connection in java
> environment. But i would like to pass parametres for the xqy file which i am
> calling using XCC and then run the xqy based on those parameters.
>
> I see something like setoptions is it used to set the parameter if so how to
> set it.
>
> request.setOptions(options);
>
> Can you please share your knowledge on this, which would be highly useful for
> me.
>
> Thanks in advance,
> Ambika.
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
---
Ron Hitchens {mailto:[email protected]} Ronsoft Technologies
+44 7879 358 212 (voice) http://www.ronsoft.com
+1 707 924 3878 (fax) Bit Twiddling At Its Finest
"No amount of belief establishes any fact." -Unknown
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general