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 2003/09/19 15:51:29 UTC

serializer kicking in before transformer finished

Hi,

In my custom transformer (extends AbstractDOMTransformer implements 
LogEnabled, Cacheable) I have the following :

    public void endDocument() throws SAXException {
        super.endDocument(); // required
        try {
            helper.endDocument(); // this call potentially takes a few 
seconds
        } catch (Exception e) {
            throw new SAXException(e);
        }       
    }

sitemap snip:
<...
        <map:transform type="custom"/>
        <map:serialize type="blob"/>
..>

The result of this is that the blob-serializer seems to kick in before 
the custom transformer is fully finished. The output i'm getting is the 
output as if the transformation never occured. The logfile entries 
indicate the same, blob logentries appear in between my transformer entries.

Can i get around this? Is this expected behaviour ?

rgds
Jorg






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


Re: serializer kicking in before transformer finished

Posted by Jorg Heymans <jh...@domek.be>.
So,

this all depends on the *order* of events which wasn't clear to me
For a transformer following methods are called in sequence

startDocument()
.. all the SAX event methods here
endDocument()
notify()
transform()

and then it moves to the next pipeline component.

WIki entry 
http://wiki.cocoondev.org/Edit.jsp?page=ImplementingTransformers more or 
less describes this as well.

rgds
Jorg


Jorg Heymans wrote:

> Hi,
>
> In my custom transformer (extends AbstractDOMTransformer implements 
> LogEnabled, Cacheable) I have the following :
>
>    public void endDocument() throws SAXException {
>        super.endDocument(); // required
>        try {
>            helper.endDocument(); // this call potentially takes a few 
> seconds
>        } catch (Exception e) {
>            throw new SAXException(e);
>        }          }
>
> sitemap snip:
> <...
>        <map:transform type="custom"/>
>        <map:serialize type="blob"/>
> ..>
>
> The result of this is that the blob-serializer seems to kick in before 
> the custom transformer is fully finished. The output i'm getting is 
> the output as if the transformation never occured. The logfile entries 
> indicate the same, blob logentries appear in between my transformer 
> entries.
>
> Can i get around this? Is this expected behaviour ?
>
> rgds
> Jorg
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


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