cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: SxwGenerator: ZipInputStream gets closed
Date Tue, 13 May 2003 13:01:54 GMT
On Tue, 2003-05-13 at 14:46, Adrian Petru Dimulescu wrote:
> Hello, 
> I am trying to write an SxwGenerator (for OpenOffice writer). I am using
> the CVS cocoon 2.1 as of may 10th.
> The idea is that all xml content in the sxw zip file is grouped under an
> <office:document> 
> element.
> I use a ZipInputStream to look into the zip archive, locate an ".xml"
> entry and parse it.
> Unfortunately, it looks like the parser (or something else?) closes the
> ZipInputStream after it
> has finished its parsing.

Just an idea: make a wrapper around the inputstream that intercepts the
close() call.

> Which is not cool, as I have to parse several Zip entries (content,
> style, etc.), not only the first entry.
> As I don't need the StartDocument and EndDocument for each XML entry, i
> filter them out using a little class at the
> end of the code listing: StartEndEventFilter.

There's a class EmbeddedXMLPipe in Cocoon which does the same.

> The exception I get is: org.apache.cocoon.ProcessingException: Failed to
> execute pipeline.: Stream closed
> The whole exception backtrace is at the end of this message.
> Here is my Java file, thank you for your ideas!

These types of questions really belong on the user list.

Bruno Dumon                   
Outerthought - Open Source, Java & XML Competence Support Center                

View raw message