Well, that´s basically what the IncludeXMLConsumer (in package org.apache.cocoon.xml) does, doesn´t it? It additionally ignores the startDTD() and endDTD() methods.
Regards, -Jan > -----Ursprüngliche Nachricht----- > Von: Heiko Milke [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 6. Februar 2003 17:34 > An: [EMAIL PROTECTED] > Betreff: Re: Not handle the XML header in the sax parser > > > Hey there, > > well actually i dont recommend doing that but here is a way to do it. > > You simple write yourself a documenthandler transmitter or > whatever you > call it (i named it FragmentHandler in the Example):P > > -------------------------- > public class FragmentHandler implements ContentHandler { > > ContentHandler parent = null; > public FragmentHandler(ContentHandler parent) { > this.parent = parent; > } > } > -------------------------- > > > you have to implement ALL memberfunction of the > ContentHandler interface > and send all the events to the parent like this. > > -------------------------- > public void characters(char[] ch, int start, int length) throws > SAXException { > parent.characters( ch, start, length); > } > -------------------------- > > and in the last step you simply catch the startDocument and > endDocument > events and dont tell the parent .... > <snip> --------------------------------------------------------------------- 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]>