cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/xml SaxBuffer.java
Date Thu, 06 May 2004 06:31:44 GMT
The AbstractSAXTransformer is already able to buffer sax events
in a SAXBuffer. It has several startRecording()/endRecording()
methods (SAXBuffer, String, DOM etc.)

HTH
Carsten 

> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de] 
> Sent: Thursday, May 06, 2004 1:00 AM
> To: dev@cocoon.apache.org
> Subject: Re: cvs commit: 
> cocoon-2.1/src/java/org/apache/cocoon/xml SaxBuffer.java
> 
> On 04.05.2004 20:21, bruno@apache.org wrote:
> 
> > bruno       2004/05/04 11:21:50
> > 
> >   Modified:    src/java/org/apache/cocoon/xml SaxBuffer.java
> >   Log:
> >   * made the event classes and their data members public
> >   * added getBits() method
> >   This allows to use SaxBuffer for situations where you want
> >   to process XML parse events in pull style: first buffer the
> >   input in the SaxBuffer, and then (eg in endDocument) start
> >   reading the events out of it.
> 
> I have also written a AbstractSAXBufferTransformer, which is 
> very similar to AbstractDOMTransformer. For replacing strings 
> I needed to buffer, but I did not want to create a DOM and so 
> I simply jumped into the SAX events when they came in and 
> when they were replayed from the buffer. At the end I have my 
> AbstractStringReplaceTransformer and an extended special one, 
> that implements the transform() method specific to my needs.
> 
> If there is any interest ...
> 
> Joerg
> 
> 


Mime
View raw message