cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@dti.net>
Subject Re: What is Cocoon good for???
Date Tue, 13 Nov 2001 14:39:34 GMT
At 03:33 PM 11/13/01 -0800, you wrote:
>Ok I'm a bit frustrated right now, but nothing I do works :(
>
>I have tried to deliver XML from my Java method to C2 as a stream of ASCII
>XML, as a string of ASCII XML, as a SAXSource and as a DOMSource. But to no
>avail.


In a nushell, what you are doing wrong:  you are trying to use Cocoon in a way that it was
not indended.  Your message indicates this: "I have tried to deliver XML from my Java method
to C2".  Writing an XSP page which generates XML from some outside source and then feeds it
back is a bit beyond what XSP is intended to do.

Take a step back and look at the C2 architecture:

* Generators - produce XML (as a SAX stream), and send it to the transformer(s)

* Transformers - modify the XML, and send it to either other transformers or the serializer

* Serializers - modify the XML for output


What it looks to me like you are trying to do is squeeze generator functionality into an XSP
page.  And you're running into problems when doing it.

So don't do it.  Write a generator that reads your Controller and generates a SAX stream.
 Then have a stylesheet modify this stream.

That's what Cocoon is good for:  generate XML, transform it, and output it.


DR


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