cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <>
Subject Re: [RFI] Garbage
Date Wed, 25 Jun 2003 02:09:21 GMT
On 24/6/03 23:58, "Joerg Heinicke" <> wrote:
> Pier Fumagalli wrote:
>> SetAttribute vs Well-formedness:
>> --------------------------------
>> <paragraph>
>> #if {something}
>>   #@class={"myClass"}
>> #else
>>   #@type={"outerType"}
>> #fi
>> </paragraph>
>> Think also in the case in which the attribute starts with "xmlns", so, the
>> attribute defines a namespace scoping... I don't know... I need input on
>> this.
> You know I prefer the second one. This would also allow to use XML
> editors while you need a Garbage editor for the first one - or do you
> already have one in your sleeve ;-)

Nope, nothing up my sleeve on that... But I hear your point... Plus other
voices "hint" me for the "setAttribute" approach, so, well, better to make
it work (once ITWeek is over).

>> Including and "calling" templates:
>> ----------------------------------
>> I believe that Chris outlined that we definitely need to have an #include or
>> #import function to import templates defined in other source files, but I
>> also wanted to know if there's the need to have a parallel to templates
>> matching and application as in XSLT...
> How to handle context switching? Or is it not needed because it's just
> used as simple template language?
> Simple sample:
> <table>
> #foreach {row}
>  <tr>
>    #foreach {cell}
>      <td>{@value}</td>
>    #end
>  </tr>
> #end
> </table>
> In more complex cases templates would allow reusability. Depends on the
> use cases for this template language.

Correct... In a case of a #foreach statement, the context is "switched"
already, the context element becomes the Nth element matched by the Xpath
expression following foreach...

Same thing should happen with #call... I'll post some examples...

>> I hope I am making some sense... If not, flame me badly... It's 2:30 am, and
>> I spent the whole day coding JSPs with a bad fever :-(
> Not so bad :-)

At least! :-)


View raw message