Lars Huttar wrote:
Lars Huttar wrote:
Thank you thank you!
Suggestion, for doc editors: a cross-reference from the Request Generator
page to StreamGenerator.
http://cocoon.apache.org/2.1/userdocs/generators/request-generator.html
describes the Request Generator as "Generates an XML
representation of the
incoming request." Which is true except for the body of the request, so
maybe it should say "Generates an XML representation of the incoming
request's headers and parameters." and have a cross-reference
such as "For
the body of the incoming request, use StreamGenerator."
You send me a patch, I'll commit it. How's that sound?
Sounds good. What do I edit, the "view source" output from
http://cocoon.apache.org/2.1/userdocs/generators/request-generator.html?
I looked at the cocoon/docs/xdocs/userdocs/generators/request-generator.xml
file locally (from 2.1.5.1), but it was very different from the above web
page.
Er,
http://svn.apache.org/viewcvs.cgi/cocoon/branches/BRANCH_2_1_X/src/documentation/xdocs/userdocs/generators/status-generator.xml?rev=36463&root=Apache-SVN&view=markup
would be one of the two do do. The other would be:
http://svn.apache.org/viewcvs.cgi/cocoon/trunk/src/documentation/xdocs/userdocs/generators/stream-generator.xml?root=Apache-SVN
Glad it helped! The stream generator is much underrated I think - has
helped me in a number of situations.
Yeah, I had never come across it, but it seems very valuable.
Next question: Is there a way to inject this data into the pipeline other
than as a generator? My desire is to have my XSP page use data from the HTTP
request body (which is a small XML snippet). So the XSP page wants the
serverpages generator. When my data was coming in as request parameters, the
XSP page was able to get the values of those parameters and use them. But if
my data is coming from a stream generator, then it seems that things get
more complicated.
Well, best thing in my opinion is to avoid XSP! But that's another
thing. If you want to get at the body of the request, well, just look at
the source of the StreamGenerator! It isn't hard. You could do that from
within your XSP.
1) I could have a separate pipeline (StreamGen -> XSLT transformer) that
generates the XSP page with my XML data embedded in it, then call that
pipeline via an XSP Action. Downside: more sitemap complexity (recursive
Cocoon calls) and harder to see what it's doing.
2) Can I use some kind of input module? The Request module doesn't seem to
have a way to "get" the content. Unless the content is an attribute...?
See above. I presume, if you're using XSP, you're not afraid of Java.
Regards, Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]