cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Re: help needed (OWQL)
Date Mon, 09 Aug 2004 19:53:55 GMT
Halgurt Mustafa-Ali wrote:
> I am tryong to itegrate OWQL in to the cocoon framework, I implemented a 
> Transformer for that purpose (see the Attachment please). 
> 
> The OWQL tool has a method printAnswerAsXML (String reqxml, PrintWriter pw)
> 
> do you have an idea how can I convert pw to SAX events?

Though job. The lazy way would be to use a PipeStream to
pipe the content written to the PrintWriter to a SAX parser
running in another thread. That's likely to course trouble
in some circumstances. Another way would be to implement
a PrintWriter subclass and an InputSource subclass in order
the get the character stream through a parser. NIO char
buffers seems to be yet another approach.
The most clean way would be to hack the OWQL tool to provide
SAX events to the outside world, of course.

J.Pietschmann

Mime
View raw message