cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: [FYI] GSoC 2006 announced!
Date Mon, 17 Apr 2006 22:00:50 GMT
El lun, 17-04-2006 a las 17:09 +0200, Daniel Fagerstrom escribió:
> The idea is to have a template language that can do about the same 
> things as JXTG, but that uses attributes instead of elements as 
> directives. The gain is that such a template language works better with 
> visual tools as e.g. Dreamweaver. Zope and Tapestry have own attribute 
> template languages. We had some discussions on cocoon-dev about 
> implementing one for Cocoon some while ago: 
> http://wiki.apache.org/cocoon/AttributeTemplates.
> 
> The Forrest dispatcher is a more high level concept IIUC.

Yes, because the aim of the dispatcher is to be a contract framework.
The structurer templates contain format independent expressions which
makes it possible for designer to quickly place different contracts for
different output formats - without worrying about the underlying
implementation of the contract. 

No, because ATM we are using jx (just some) for the structurer templates
and some user feedback were that it would be nice to have something like
the wiki page describes. JXTG is not for designer, but the attribute
based variant as well only limited. 

One thing that I did not like too much is that the syntax for variables
is mixed. First we use var and then ${}.
<div do="if(count(cart/item) == 0)">
   Your cart is empty
<div>

Here we do not use something like in jx 
<jx:if test="${cart.numberOfItems == 0}">
  Your cart is empty
</jx:if>

Later on we then use ${cart[i]/index}.

<table>
   <tr do="for(var=i,begin=1,end=10)">
     <td>${cart[i]/index}</td>
     <td>${cart[i]/description}</td>
     <td>${cart[i]/price}</td>
   </tr>
</table>

That makes it harder to follow.

Did somebody has started something like this yet. 
I mean one can start with a simple transformer doing context()
and if(). Later on we extend this. 

> 
> /Daniel
> 
> Thorsten Scherler skrev:
> > El dom, 16-04-2006 a las 11:05 +0200, Daniel Fagerstrom escribió:
> >   
> >>> Thoughts?
> >>>       
> >> An attribute template language for Cocoon would still be nice.
> >>
> >> /Daniel 
> >>     
> >
> > I am not sure about your definition of attribute template language but
> > you may want to have a look at the forrest dispatcher. 
> > http://forrest.apache.org/docs_0_80/dispatcher.html
> > http://forrest.apache.org/docs_0_80/howto/howto-dispatcher-quickstart.html
> > http://forrest.apache.org/docs_0_80/howto/howto-structurer-dsl.html
> >
> > salu2
> >   
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message