cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject TeeTransformer
Date Mon, 23 May 2005 14:13:31 GMT

I need something like the SourceWritingTransformer that would allow me 
to log, for debugging purposes, the contents of an XML document that is 
output by a generator. The problem with the SWT is that it expects its 
input to contain extra tags to direct its behavior, but my input does 
not contain such tags. I just need the transformer to save its input to 
a file as-is and stop at that.

The reason for this is that my application is receiving some XML 
documents over HTTP, so I'm using the StreamGenerator and a custom 
trasformer downstream, but for debugging I need to save the contents of 
the stream as they are received. So what I need is simply:

<map:generate type="stream"/>
<map:transform type="tee" src="debug.xml"/>
<map:transform type="custom"/>

Does anybody have some code for this to share?



Ugo Cei
Tech Blog:
Wine & Food Blog:
View raw message