You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lionel Crine <cr...@4dconcept.fr> on 2003/02/06 11:53:52 UTC

Re: AW: AW: convert String into Sax events into my own transformer

I Found IT!!! thanks a lot

At 11:50 06/02/2003 +0100, you wrote:
>Sorry, I forgot to tell you that you can wrap your xmlConsumer into a 
>org.apache.cocoon.xml.IncludeXMLConsumer.
>This class basically ignores the start/endDocument() and start/endDTD() 
>method call:
>
>parser.parse(inputSource, new IncludeXMLConsumer(xmlConsumer()));
>
>
>BTW, where does your String come from? If you just want to emit one single 
>tag, e.g. <test/> it will be easier to just call the sax methods directly.
>
>I assume that your transformer extends AbstractTransformer. Then you can 
>do the following
>
>//create <test/> in consumer
>super.startElement("", "test", "test", new 
>org.xml.sax.helpers.AttributesImpl());
>super.endElement("", "test", "test");
>
>
>If you really want to build your own transformer, I can only recommend to 
>have a look at the sources of cocoon-transformers. This helps a lot.
>
>What confused me a bit about your last post, is that you have xsp code in 
>your browser... Maybe you could explain in more detail what you are trying 
>to do, then we might help you better.
>
>Regards,
>
>-Jan
>
> > -----Ursprüngliche Nachricht-----
> > Von: Lionel Crine [mailto:crine@4dconcept.fr]
> > Gesendet: Donnerstag, 6. Februar 2003 10:33
> > An: cocoon-users@xml.apache.org
> > Betreff: Re: AW: convert String into Sax events into my own
> > transformer
> >
> >
> > OK, it's allmost working because i still have :
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > and In my browser I have :
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsp:page xmlns:xsp="http://apache.org/xsp"
> > xmlns:ixia-query="http://www.ixiasoft.com/ixia/query/1.0">
> >
> >
> > <ixia-query:document>
> >    <?xml version="1.0" encoding="UTF-8"?>
> > <test/>
> > </ixia-query:document>
> >
> > </xsp:page>
> >
> >
> > I would like the parser to not keep the <?xml version="1.0"
> > encoding="UTF-8"?>.
> >
> > Is it possible ?
> >
>
>
>---------------------------------------------------------------------
>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:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>