You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorg Heymans <jh...@domek.be> on 2004/07/26 17:04:14 UTC

Calling base class implementations (was Re: setting Document as instance variable in a transformer)

Forget below red herring :)

I was overriding recycle() and not calling super.recycle(). When 
overriding methods, it is sometimes necessary to call the base 
implementation and sometimes not - confusing !

Is there a rule to follow here?

Regards
Jorg

Jorg Heymans wrote:

> (having a deja-vu but can't find it back in the mailinglist)
> 
> I have a transformer extending AbstractDOMTransformer.
> For convenience i assigned in transform(Document) the document to an 
> instance variable (so i could manipulate it in different methods without 
> having to pass it around the whole time)
> 
> Result: My custom transform works only once, the second time i get
> ======
> Description: org.apache.cocoon.ProcessingException: Failed to execute 
> pipeline.: org.xml.sax.SAXException: Mehr als ein Root für ein 
> Dokumentobjektmodell ist nicht möglich!
> ======
> which means sth like: "you can't set more than one Root in a document 
> object model".
> 
> When i change something in the sitemap, it works again only once and 
> never again. When not using the instance variable all works fine.
> 
> 
> What is causing this? When not using the instance variable all is 
> okidoki. Some lifecycle stuff i don't know (have forgotten) about?
> 
> 
> ???
> Jorg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org