cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Ekstedt <ekst...@ibg.uu.se>
Subject Re: [RT] Attribute Driven Templates (Was: [RT] do me a favor, don't call them taglibs)
Date Sat, 04 Dec 2004 16:39:36 GMT
On Sat, 4 Dec 2004, Daniel Fagerstrom wrote:

snip...
>
> if(<test>)
> ----------
>
> example:
>
> <div do="if(count(cart/item) == 0)">
>    Your cart is empty
> <div>
>

How would you implement choose/when?

snip...
>
> Several directives
> ------------------
>
> So, how do we handle multiple directives for one element? We could
> handle the TAL example above like:
>
> <p
> do="let(x=/a/long/path/from/the/root;if(x);content(x/txt);attributes(class=x/class)">
>    Ex Text
> </p>

Isn't there a risk that attribute templates become unreadable?

snip...
>
> Connection to JXTG
> ------------------
>
> The directives are almoust defined in such a way that they could be
> translated to a tag based templating language like:
>
> directive(param_1=value_1,...,param_n=value_n)
>
> <=>
>
> <jx:directive param_1="value_1" ... param_n="value_n"/>
>
> Maybe we could find a attribute directive language that allows for
> complete correspondance. And make tag or directive syntax selectible and
> in such way make this effort compatble with JXTG?

I like this idea very much. It would be a shame if the quirks of
Dreamweaver should force everyone to use an awkward syntax.

Cheers Jonas

Mime
View raw message