hi,

recently I needed to extend cocoon's I18nTransfomer for loading multiple sets of catalogues for different pipelines. The information what catalogues form a set, which sets to use for the different pipelines was stored in DB. So I had to change a lot and recognized that it is quite difficult for me to extend the existing I18N transformer.

The Idea was, whenever cocoon's I18N transformer is enhanced with some more functionallity, my new transfomer should support the features too.

With the existing I18nTransformer class this seems not to be possible. So my Idea was to move all the stuff doing the real transformations, implementing the logic for the i18n:*-Elements and doing lookups in the catalugues to an abstract class called AbstractI18nTransformer.

Now the cocoon I18nTransformer extends this class and implements only the logic for loading the right catalogues as configured in the sitemap, mainly the setup(..) and configure(..) methods and the Cachable interface are implemented here.

Like this I have a nice separation between the real transforming part and the part loading and configuring the catalogues. Now I can simply extend this AbstractI18nTransformer and add my own catalogue loading logic.

Coming back to my point that I want to have enhancments to the I18n functions also in my transfomer without editing my code again and again: My separation of the two parts of the I18n transfomer only makes sense if there is some interest in having this AbstractI18nTransformer integrated into cocoon.

So I'd like to know if there is some interest in having this change integrated into cocoon.

I sent my example how this separation could be done as an enhancement to the bugzilla (#32690). Would be nice to hear some thoughts about the idea.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32690

kind regards,
Christoph Gaffga
[EMAIL PROTECTED]

Reply via email to