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]>