AW: Not handle the XML header in the sax parser
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]
Re: AW: Not handle the XML header in the sax parser
Hey Jan Am Don, 2003-02-06 um 18.03 schrieb Jan Harms: 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 didnt know :) Thanks for the hint ! Heiko - 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]
AW: AW: Not handle the XML header in the sax parser
Heiko Milke wrote: Am Don, 2003-02-06 um 18.03 schrieb Jan Harms: 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 didnt know :) Thanks for the hint ! Heiko Well, I also keep reinventing wheels, you know. ;-) Would be nice to have an alarm that goes off every time I implement functionality that already exists for free. *That* would really be a useful IDE feature... :-) :-) :-) Gruß aus Dortmund -Jan Harms - 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]