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"/>
 </map:generator>

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

- Miles Elam



Reply via email to