Component that allocate and cache JXPathContexts bound to VariableContext,
Cocoon Request, Cocoon Session and Cocoon Context.
If you need to limit the attibute lookup to just one scope, you can use the
pre-definded variables "request", "session" and "application".
For example, the expression "$session/foo" extracts the value of the
session attribute named "foo".
Following are some implementation details.
There is a separate JXPathContext for each of the four scopes. These contexts are chained
according to the nesting of the scopes. So, the parent of the "variable"
JXPathContext is a "request" JXPathContext, whose parent is a "session"
JXPathContext (that is if there is a session), whose parent is an "application"
context.
Since JXPath chains lookups for variables and extension functions, variables
and extension function declared in the outer scopes are also available in
the inner scopes.
The "session" variable will be undefined if there is no session for this servlet.
JXPath does not automatically create sessions.
author: Volker Schmitt version: $Id: JXPathCocoonContexts.java 433543 2006-08-22 06:22:54Z crossley $ |