You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jozsa Kristof <dy...@kami.vein.hu> on 2002/02/01 12:55:11 UTC

Feeding XML String in Transformator

Hi,

I have an EJB-Cocoon setup. I use a custom Transformer to replace a specific
xml tag on the pipeline with a String pulled from EJB middleware; but has
met some problems doing so. 

First I thought I just write the startElement() method of the Transformer,
which looks for the specific xml tag, and do super.contentHandler.characters
(myXMLStringFromEJB), but of course this will handle the whole XML string as
characters (< and > converted to &lt; and &gt;), so that's not the way to do
it.

So the question is, how do I parse an additional XML string properly into
the currently processed XML stream in a Transformator?

Christopher
-- 
.Digital.Yearning.for.Networked.Assassination.and.Xenocide

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


Re: Feeding XML String in Transformator

Posted by Mauricio Souza Lima <ma...@terra.com.br>.
It's a possibility. That way works too, it depends on what you will need
after...

Jozsa Kristof wrote:
> 
> So I guess I'd better go with a Generator, use aggregate in the sitemap, and
> manipulate with xsl if I need to, right?
> 
> On Fri, Feb 01, 2002 at 11:29:28AM -0200, Mauricio Souza Lima wrote:
> > You have to parse your string to transform it in SAX events...
> >
> > Best Regards...
> >
> > MSL
> >
> > Jozsa Kristof wrote:
> > >
> > > Hi,
> > >
> > > I have an EJB-Cocoon setup. I use a custom Transformer to replace a specific
> > > xml tag on the pipeline with a String pulled from EJB middleware; but has
> > > met some problems doing so.
> > >
> > > First I thought I just write the startElement() method of the Transformer,
> > > which looks for the specific xml tag, and do super.contentHandler.characters
> > > (myXMLStringFromEJB), but of course this will handle the whole XML string as
> > > characters (< and > converted to &lt; and &gt;), so that's not the way to do
> > > it.
> > >
> > > So the question is, how do I parse an additional XML string properly into
> > > the currently processed XML stream in a Transformator?
> > >
> > > Christopher
> > > --
> > > .Digital.Yearning.for.Networked.Assassination.and.Xenocide

-- 
Mauricio Souza Lima
Rational Consulting
mauriciosl@terra.com.br
Rua Helena, 140 / cj. 82
São Paulo - SP - Brazil
Fone / Direct: +55 11 3842-7138

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


Re: Feeding XML String in Transformator

Posted by Jozsa Kristof <dy...@kami.vein.hu>.
So I guess I'd better go with a Generator, use aggregate in the sitemap, and
manipulate with xsl if I need to, right? 

On Fri, Feb 01, 2002 at 11:29:28AM -0200, Mauricio Souza Lima wrote:
> You have to parse your string to transform it in SAX events...
> 
> Best Regards...
> 
> MSL
> 
> Jozsa Kristof wrote:
> > 
> > Hi,
> > 
> > I have an EJB-Cocoon setup. I use a custom Transformer to replace a specific
> > xml tag on the pipeline with a String pulled from EJB middleware; but has
> > met some problems doing so.
> > 
> > First I thought I just write the startElement() method of the Transformer,
> > which looks for the specific xml tag, and do super.contentHandler.characters
> > (myXMLStringFromEJB), but of course this will handle the whole XML string as
> > characters (< and > converted to &lt; and &gt;), so that's not the way to do
> > it.
> > 
> > So the question is, how do I parse an additional XML string properly into
> > the currently processed XML stream in a Transformator?
> > 
> > Christopher
> > --
> > .Digital.Yearning.for.Networked.Assassination.and.Xenocide
> > 
> > ---------------------------------------------------------------------
> > 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: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> 
> -- 
> Mauricio Souza Lima
> Rational Consulting
> mauriciosl@terra.com.br
> Rua Helena, 140 / cj. 82
> S?o Paulo - SP - Brazil
> Fone / Direct: +55 11 3842-7138
> 
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
> 

-- 
.Digital.Yearning.for.Networked.Assassination.and.Xenocide

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


Re: Feeding XML String in Transformator

Posted by Mauricio Souza Lima <ma...@terra.com.br>.
You have to parse your string to transform it in SAX events...

Best Regards...

MSL

Jozsa Kristof wrote:
> 
> Hi,
> 
> I have an EJB-Cocoon setup. I use a custom Transformer to replace a specific
> xml tag on the pipeline with a String pulled from EJB middleware; but has
> met some problems doing so.
> 
> First I thought I just write the startElement() method of the Transformer,
> which looks for the specific xml tag, and do super.contentHandler.characters
> (myXMLStringFromEJB), but of course this will handle the whole XML string as
> characters (< and > converted to &lt; and &gt;), so that's not the way to do
> it.
> 
> So the question is, how do I parse an additional XML string properly into
> the currently processed XML stream in a Transformator?
> 
> Christopher
> --
> .Digital.Yearning.for.Networked.Assassination.and.Xenocide
> 
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>

-- 
Mauricio Souza Lima
Rational Consulting
mauriciosl@terra.com.br
Rua Helena, 140 / cj. 82
São Paulo - SP - Brazil
Fone / Direct: +55 11 3842-7138

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