cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Morandini" <l.mo...@tin.it>
Subject RE: Outputting raw XML from a Transformer
Date Wed, 24 Oct 2001 18:04:44 GMT

 Sylvain,

 	yes, it worked :)

 	With a little derived from EmbeddedXMLPipe I was able to
 get rid of PIs and start/end of document.

 Thanks,

 ---------------------------------------------
                Luca Morandini
                GIS Consultant
               lmorandini@ieee.org
 http://utenti.tripod.it/lmorandini/index.html
 ---------------------------------------------


> > -----Original Message-----
> > From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
> > Sent: Wednesday, October 24, 2001 3:18 PM
> > To: lmorandini@ieee.org; cocoon-users
> > Subject: Re: Outputting raw XML from a Transformer
> >
> >
> > 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
> > >               lmorandini@ieee.org
> > > http://utenti.tripod.it/lmorandini/index.html
> > > ---------------------------------------------
> > >
> > > > -----Original Message-----
> > > > From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
> > > > Sent: Wednesday, October 24, 2001 8:58 AM
> > > > To: lmorandini@ieee.org
> > > > 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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message