commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@multitask.com.au
Subject Re: [jelly] a bug? or am I missing something
Date Tue, 15 Apr 2003 03:59:29 GMT
Warner Onstine <sw-list@warneronstine.com> wrote on 15/04/2003 01:37:10 
PM:

> Ugg, no kidding. Can you think of any other way to loop through 
selection of
> xml nodes?

try using the items attribute of forEach??
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


> 
> -warner
> 
> On 4/14/03 8:16 PM, "Ben Walding" <ben@walding.com> wrote:
> 
> > This is a pecularity of jexl I believe.
> > 
> > "size" is some kind of reserved word in the parser.
> > 
> > I posted last week having the same kind of problem
> > 
> > Solution?
> > 
> > The ugly way it to have a wrapper bean
> > 
> > $bean.syze($table)
> > 
> > but that is so ugly it makes me want to choke myself to death with a
> > rotting couch cover.
> > 
> > 
> > Warner Onstine wrote:
> > 
> >> Ok, I'm basically trying to duplicate some stuff from xsl land here 
and am
> >> having some serious problems.
> >> 
> >> Here's my jelly snippet:
> >> <x:set var="tables" select="database/table"/>
> >> 
> >> <j:forEach indexVar="index" begin="1" end="${tables.size()}" step="1"
> >> items="${tables}" trim="no">
> >>    <x:set var="currentTable" select="/database/table/[$index]"/>
> >>    <j:set var="className"><x:expr
> >> select="$currentTable/@className"/></j:set>
> >>    <vel:merge name="${outputDir}/${className}Peer.php" 
basedir="templates"
> >> readOnly="true" template="classes/peer.vm"/>
> >>    <vel:merge name="${outputDir}/Base${className}.php" 
basedir="templates"
> >> readOnly="true" template="classes/base.vm"/>
> >> </j:forEach>
> >> 
> >> Now, here's the problem I am running into:
> >> 55 [main] ERROR parser.XMLParser  - Caught exception:
> >> org.apache.commons.jelly.JellyException: null:-1:-1: <null> 
Encountered ".
> >> size" at line 1, column 7.
> >> Was expecting one of:
> >> ------------
> >> Now, through all the examples I've read this should work. $tables is 
an
> >> ArrayList and has the method size().
> >> 
> >> Any reason why this isn't working?
> >> 
> >> -warner
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >> 
> >> 
> >> 
> >> 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> 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