You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tanmay Kumar <ta...@isd.nec.co.jp> on 2002/10/16 06:57:38 UTC

TransFormers

Hi all,

I am finding Cocoon very useful for our project. Thanks a lot to the
developers...
I have one requirement like this. Is there any Cocoon class to address this
issue?
Input will be a DOM node, but while parsing the DOM node all SAX events
should be fir.

Example:

<R>
    <A>101</A>
    <B>World</B>
</R>

While it got the root element as 'R', startElement() method should be
invoked with proper arguments i.e name, attributelist.

Again when the child element is a text node as per DOM(101 in ex.) ,
characters() method should be fired.

I am not sure about
org.apache.cocoon.transformation.ReadDOMSessionTransformer.java file whether
it can meet this.

Please let me know if any cocoon APIs can address this or any other free
source code which can meet this requirement.

If u need more clarification, please let me know.

It will be a great help.

thanks,
Tans





---------------------------------------------------------------------
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>


Re: TransFormers

Posted by Jeff Turner <je...@apache.org>.
On Wed, Oct 16, 2002 at 01:57:38PM +0900, Tanmay Kumar wrote:
> Hi all,
> 
> I am finding Cocoon very useful for our project. Thanks a lot to the
> developers...
> I have one requirement like this. Is there any Cocoon class to address this
> issue?
> Input will be a DOM node, but while parsing the DOM node all SAX events
> should be fir.
> 
> Example:
> 
> <R>
>     <A>101</A>
>     <B>World</B>
> </R>
> 
> While it got the root element as 'R', startElement() method should be
> invoked with proper arguments i.e name, attributelist.
> 
> Again when the child element is a text node as per DOM(101 in ex.) ,
> characters() method should be fired.

I think you want org.apache.cocoon.xml.dom.DOMStreamer:

 * The <code>DOMStreamer</code> is a utility class that will generate SAX
 * events from a W3C DOM Document.

If you want to use this in a Transformer, have a look at
AbstractDOMTransformer.

--Jeff

> 
> thanks,
> Tans

---------------------------------------------------------------------
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>