cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: Implementation of a tag attribute language
Date Sun, 05 Dec 2004 17:23:39 GMT
Jonas Ekstedt wrote:
> On Sun, 5 Dec 2004, Daniel Fagerstrom wrote:
> Yeah, that's a better idea. We could even go a step further:
> PlainElementToken  localName="table"
> ForEachTALToken    parameter[0]="listOfBeans"
> IfTALToken         parameter[0]="a < b"
> PlainElementToken  localName="tr"
> ...


>>By having a standardized way to pass arguments to both attribute and tag
>>driven directives they can share implementation.
> I'd say they're sufficiently different to warrant separate
> implementations.
We'll see no need to decide now.

> A TALToken parameter can be stored
> as a single Expression object whereas a TagToken attribute is either a
> CharactersToken or an ExpressionToken (or even a mix of both).
Yes, you're right. I don't know, but I would suggest that it is an 
mistake in the implementation of JXTG. Many of JXTGs tags are modelled 
after XSLT and XSLT let the "xsl:" tags "decide" how an attribute should 
be interpreted. I would prefer the same strategy for tags in Template. 
But as we strive for back compabillity I guess it is not possible.

> There are
> probably other differences as well. Also there won't be all that many
> TALTokens so the code duplication will be negligble.

>>WDYT, am I missing something? Do you have anything against if I refactor
>>the code in the direction I described above?
> What you propose is certainly a better solution. I always felt
> uneased by getStart(), getStartBody() and the likes. Won't be able to help
> unfortunately as exams are looming.

Good, then I take care of the refactoring.


View raw message