From: Wolfgang M. <wol...@ex...> - 2009-07-23 18:55:56
|
> If this query is ran from inside a java program, is there any way to > bind a value to the $var1 variable? I was looking for something like this: > Variable myVariable = ValueFactory.newVariable (name, value); > request.setVariable (myVariable); Using the XMLDB API, you can call XPathQueryService.declareVariable("var1", "test") to set the variable (or the corresponding XQueryService.declareVariable). The value will be automatically cast into a valid XQuery type. Wolfgang |