commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Perez Jorge <ape...@ignos.com>
Subject Re: JXPath - shared Context
Date Mon, 10 May 2004 08:44:57 GMT
Paul McClure wrote:

> Thanks Adrian,
>    The patch for functions works - and I see the variable in the 
> parent now also. I was trying to access them with:
>  ctx.getVariables().getVariable("myVar"); which didn't work.

Documentation says that ctx.getVariables() will return the variable pool 
associated with that context.  And different contexts can use different 
variable pool implementation, so variable storage is not unified in 
parent/childs contexts.  To look for a variable using client API instead 
of XPath you will have to navigate parent context by parent context, 
more or less like the non-client API method getVariablePointer() does.

> One other thing I was trying to do is to set lenient to true 
> (s_sharedContext.setLenient(true);). This is not shown in the 
> examples, but should this be seen by child contexts?

In commons-jxpath-1.1 ctx.isLenient() does not look in parent contexts, 
but current CVS code of jxpath does.

> thanks again for your help,
> Paul
>
Cheers,

Adrian P.J.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message