from the facts given I suspect that you didn't correctly override the setup
method. check carefully that the method signature is correct; check your
imports (e.g. you might have imported excalibur's SourceResolver instead of
cocoon's).

> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Stefan Pietschmann
> Gesendet: Mittwoch, 21. Januar 2004 21:46
> An: [EMAIL PROTECTED]
> Betreff: AW: AW: AW: use parameter from sitemap in java transformer
>
>
> Hi again,
>
> Below you can see what's in my sitemap an in the transformer
> currently. The
> transformer is still working fine, the parameter not. With some
> system.out's
> I've found out, that it doesn't seem to go into the if-loop in
> setup(). When
> I try a system.out.println(par.toString()) it doesn't give me anything, so
> it seems to me the parameter isn't passed to the setup method.
> Anything I need to specify in the sitemap perhaps to make my transformer
> work with parameters?
>
> Oh, and thanks a lot for your help so far ;)
> stefan
>
>
> <map:transformer name="addLinks"
> src="de.amacont.dom.transformation.LinkTransformer"/>
> ...
> ...
> <map:transform type="addLinks">
>       <map:parameter name="componentTag" value="comp"/>
> </map:transform>
>
> -----------------------
>
> public class LinkTransformer extends AbstractDOMTransformer {
>   ...
>   private String COMP_TAG = "span";
>   ...
>
> public void setup(...)throws ProcessingException, SAXException,
> IOException{
>
>       if (par.isParameter("componentTag")) {
>               try {
>                       this.COMP_TAG = par.getParameter("componentTag");
>               }
>               catch (ParameterException pe) {...}
>       }
> }
>
> public Document transform(Document docu) { .....}
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to