cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy G. Biv" <>
Subject Re: [Design] JXTG 2.0 (Just my opinion)
Date Sat, 04 Dec 2004 21:11:26 GMT
Bertrand Delacretaz wrote:

> That's what I mean - having a transformer that can use the same 
> template syntax as used in the generator, so that the template 
> language can be used for both the generation and transformation steps.

Aren't you really talking about just a transformer then?  The current 
role of generator would be handled by a FileGenerator loading the 
template for processing by the transformer.  The processing model would 
be kept with the SourceValidity object -- possiblity for reuse whenever 
the previous parts of the pipeline are cacheable.

Then the generator simply becomes a virtual one:

  <map:generator name="template">
    <map:absolutize param="templatename"/>
    <map:generate type="file" src="{templatename}.xml"/>
    <map:transform type="template"/>

A two for one!  Only one codebase to maintain.  Nothing to keep in sync.

- Miles Elam

View raw message