Yes, of course you can bind a value from the application. In XQJ that's done 
using the bind...() methods of XQDynamicContext.

Michael Kay
Saxonica

On 19 Jun 2013, at 08:58, Kunal Chauhan wrote:

> Yes Michael, You are right.
> as soon as I run this query through java code where I am using XQuery 1.0 and 
> XQJ implementation. It gives me an error.
> 
> earlier I tried with Query editor so it works. but after integrating it with 
> java code it doesn't.
> 
> Is there any way to bind an empty sequence  or any other work around?
> 
> 
> 
> On Wed, Jun 19, 2013 at 12:52 PM, Michael Kay <[email protected]> wrote:
> Actually, this is XQuery 3.0 syntax. 
> 
> XQuery 1.0 gives you no way to define a default value for an external 
> variable (a crazy omission).
> 
> You clearly have an expectation that the default value for an external 
> variable should be an empty sequence. You may regard that as intuitive, but 
> it's not what the spec says.
> 
> Michael Kay
> Saxonica
> 
> 
> 
> On 19 Jun 2013, at 07:34, Kunal Chauhan wrote:
> 
>> Thanks David, Thanks for your quick response.
>> It's works.
>> can you tell me logic behind this ?
>> 
>> 
>> On Wed, Jun 19, 2013 at 11:44 AM, David Lee <[email protected]> wrote:
>> try
>> 
>>  
>> 
>> declare variable $a external := ();
>> 
>>  
>> 
>>  
>> 
> 
> 
> 
> -- 
> Kunal Chauhan
> [email protected]
> [+918655517141]
> _______________________________________________
> [email protected]
> http://x-query.com/mailman/listinfo/talk

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to