I agree with you. I thought that using a serializer would be useful to get an input source for the parser. But now I see that it would be much better to use JARV to develop the transformer based only in SAX events (use 4_2 of JARV), as you suggested.
I have another question, which is the same I did before: how do I set the VerifierHandler of JARV in order to send to it the SAX events the transformer is receiving from the previous component? With super.setContentHandler(verifierHandler), perhaps? public class ValidationTransformer extends AbstractSAXTransformer { ... super.setContentHandler(verifierHandler); ... } Thank you Oskar ----- Original Message ----- From: "Jeff Turner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 20, 2003 1:22 PM Subject: Re: serializing inside a transformer > On Mon, Jan 20, 2003 at 01:00:41PM +0100, Oskar Casquero wrote: > > Hi, > > > > I would like to serialize SAX events to a file inside a transformer, so > > that I can validate the file with the parser. The problem is that I > > don't how to set the serializer in order to make it able to receive the > > SAX events which the transformer is receiving from the previous > > component (a generator or another transformer). > > How about inheriting from DOMTransformer, and then (if possible) > validate the DOM directly, or use o.a.c.xml.XMLUtils#serializeNode() to > get a String which you can validate? > > It's a nasty hack though. Best way would be to write a > ValidatorTransformer that validates SAX events as they go past: > > http://iso-relax.sourceforge.net/JARV/JARV.html#use_42 > > > --Jeff > > ... > > Oskar > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>