cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Stevens <at...@hotmail.com>
Subject RE: Accessing sitemap label-attribute in TraxTransformer
Date Fri, 30 Nov 2007 13:32:27 GMT

You seem to be missing the point of dependency injection - the TraxTransformer doesn't 
look up its logger or specify its name or anything like that.  It just declares "I want a
logger"
(by implementing a "loggable" interface), and the component manager gives it one.
So to do what you are suggesting would involve changing the component manager, not
your transformer, so that it uses the label attribute or whatever to determine the logger

that it passes into the transformer after creating it.

What are you trying to achieve, though?  If you just want your transformer to use a different
name/category to the default TraxTransformer, why not just specify a different logger=...
parameter when you declare your component in the map:transformers section of your
sitemap?


Andrew.
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku solver

> Date: Fri, 30 Nov 2007 10:31:56 +0100
> From: jko@mobi-tech.com
>
> hallo out there,
>
> does anybody know if there is a possibility to access the "label"-attribute from map:transform
inside the
> TraxTransformer (java-code)?
>
> I wrote my own TraxTransformer and I want to use the sitemap "label"-attribute as a logger
name.
>
> Greetings
> Janne Olesen

_________________________________________________________________
Celeb spotting – Play CelebMashup and win cool prizes
https://www.celebmashup.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message