Luca Morandini a écrit : > > Sylvain, > > ok, I parsed it, and it shows gracefully... bar for an "<?xml version="1.0" > encoding="UTF-8"?>" on top of every XML string which I receive from the > external application. > > I think this PI causes an "AbstractXMLPipe: Exception in endDocument" when > I try to render the XML output in HTML via a stylesheet. > > Hence, how could I get rid of this unwanted PI ? >
You need also to put between the parser and the transformer output a filter that removes start/endDocument and PIs from the parsed document. org.apache.cocoon.xml.EmbeddedXMLPipe strips start/endDocument, but not <?xml?> PI's. Your filter can extend this class and strip also PIs. Sylvain. > Thanks in advance, > > --------------------------------------------- > Luca Morandini > GIS Consultant > [EMAIL PROTECTED] > http://utenti.tripod.it/lmorandini/index.html > --------------------------------------------- > > > -----Original Message----- > > From: Sylvain Wallez [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, October 24, 2001 8:58 AM > > To: [EMAIL PROTECTED] > > Subject: Re: Outputting raw XML from a Transformer > > > > > > > > > > Luca Morandini a écrit : > > > > > > Folks, > > > > > > I'm writing my first Transformer, and I'd like to > > insert an XML string, > > > which I receive from another application, into the output stream of the > > > Transformer... but without parsing it, is it possible ? > > > > > > Best regards, > > > > > Nope. You have to parse it. You can lookup(Parser.ROLE) on the component > > manager to get a parser and send the resulting SAX events to the output > > of your transformer. -- Sylvain Wallez Anyware Technologies - http://www.anyware-tech.com --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>