Upayavira wrote:
I looked at the source but couldn't figure out how to do this. I see how to get the inputSource and start the parser, but then don't know how to get the output of the parse. (Incidentally I also noticed that the parse() method is deprecated.)Lars Huttar wrote:
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.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.
However the problem was solved by doing (1) below, except that I didn't need an action... just a serverpages generator whose src pointed to an internal pipeline whose generator was StreamGenerator (followed by XSLT). It turns out that yes, the request is still available, even in the inner pipeline.
Thanks again for your help.
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.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
