I don't know if I'm right here, but... - For java objects, Jexl can do more than JXPath. - For DOM trees, JXPath is better (readible).
Maybe it's a good idea to configure the expression language you want to use? E.g. in the configuration of the JXTG, or maybe passing it as a parameter in <map:generate ...>, so that the JXTG has one expression language when it is generating XML. Then it's fairly easy to swich from language, based on the type of data you provide. Bart. > -----Original Message----- > From: Sylvain Wallez [mailto:[EMAIL PROTECTED] > Sent: Friday, October 29, 2004 3:22 PM > To: [EMAIL PROTECTED] > Subject: Re: Expression languages (was Re: [RT] StringTemplate: The answer > to our templating needs?) > > Vadim Gritsenko wrote: > > > Sylvain Wallez wrote: > > > >> Carsten Ziegeler wrote: > > > > >>> What can you do with Jexl what you can't do with an XPath based > >>> language? My understanding is that they only differ in their syntax > >>> ('.' instead of '/'). > >>> Now even if Jexl has more functionality I don't see a reason why > >>> this could not be added to an xpath based language. > >> > >> > >> > >> Technically this should be possible, but how do we write something > >> like "widget.getChild("foo").getAttribute("bar")" in XPath? > > > > > > Tecnically, this will be > > getAttribute(getChild($widget, "foo"), "bar") > > > > in JXPath. Not exactly easy to read, but possible :) > > > That's what I meant: not exactly easy to read, especially for someone > having the related Java API in mind :-) > > Sylvain > > -- > Sylvain Wallez Anyware Technologies > http://www.apache.org/~sylvain http://www.anyware-tech.com > { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }