cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Help: XPah to Jexl
Date Tue, 21 Sep 2004 06:10:32 GMT
oceatoon wrote:

>Hi everyone
>I am having trouble retreiving an attribute in jexl.
>In jxpath, I can retreive it like this #{./description/@maxoc}
>but ${description.maxoc} doesn't work, can someone guide me please??

Jexl is a JavaBeans-oriented expression language. So you can't access 
attributes in an XML document using Jexl, except by using the DOM API 
(e.g. "${description.getAttribute("maxoc")}"). JXPath, on the contrary, 
traverses both DOM and JavaBeans hierarchies.

So in that particular case, using JXPath is the IMO the appropriate choice.


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message