Since the / operator sets the context node for the expression to the right of 
it, it is possible to set it to an arbitrary context node like this:

$context/xdmp:value(".")

You can replace "." with any expression, which will have $context as the 
context node.

-m

On Feb 4, 2010, at 4:24 PM, Mark Boyd wrote:

> Yes, I understand that, currently, custom functions must pass in the context 
> according to spec. That is inconsistent. If standard library functions can 
> achieving it should not custom functions be allowed to do the same?
>  
> Mark
>  
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Florent Georges
> Sent: Thursday, February 04, 2010 4:58 PM
> To: General Mark Logic Developer Discussion
> Subject: Re: [MarkLogic Dev General] context item within function calls
>  
>   Hi,
>  
>   A user function cannot access the context node.  You have to pass it 
> explicitly.  Some functions in the standard library have this special power 
> though.
>  
>   Regards,
>  
> -- 
> Florent Georges
> http://www.fgeorges.org
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to