cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <pati_giac...@yahoo.com>
Subject Re: [C2]Lang parameter processing
Date Fri, 15 Sep 2000 14:30:05 GMT

--- Lassi Immonen <limmonen@urova.fi> wrote:
> Hi,
> 
> I have to create multi-language site and figured do it that way I put
> xml:lang parameter to every tag I have content in multiple languages.
> 
> So I need to process "lang" parameter in one way or another in all of
> my
> documets.
> In sitemap docs there is notion of  filter component, which I suppose
> has
> become transformation?
> 
> Would the solution then be to write LangTransformer which checks
> request.getParameter("lang")/default langparameter/whatever and
> filters out
> elements which have other xml:lang parameters?
> If so, could somebody give some advice on how to do such a
> Transformer. I
> could not understand from docs/sources Cocoon2 has how to do this.

The best would be to look at some Transformers already in the CVS. Try
starting at the very simple LogTransformer to get into it.

> Is the only way to put this Transformer BEFORE other transformations
> in
> sitemap to add <transform type="lang"> every pipeline i have? Or is
> it
> possible to define it in some more easier way?

No, there is no such thing like "use this transformer immediately after
each Generator". You have to specify your transformer explicitly in
every pipeline you think you need it.

> Other thing: Discussion about adding Actions to C2 is very
> interesting to me
> and I'm willing to help in this matter if there is such a need.
> Actions
> sounds just like what my doctor ordered to me :)

The code is in the proposals/actions directory and you can include them
into a build by creating a file called action.inc in the root of you C2
repository (it's descibed in the proposals/actions/README)

The only help you can give for now is answering the following questions
after reading README Action.java and maybe HelloAction.java in
directory proposals/actions:

1) Is the Action Interface suitable for all your needs?
2) Is the behaviour of the <map:act> element what you excpect of 
   such a component?

If you have any NOs, explain them here for discussion.

Giacomo

=====
--
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message