I didn't mean to offend anyone. I have answered a number of questions, and me and my company have given a few things to both cocoon and xreporter. I realize you weren't accusing me, but wanted to point that out. I certainly am not looking for any free hand outs. Cocoon is a very busy list, and trying to monitor both the users and dev list is very difficult. I did for a long time and couldn't do both. As having used cocoon for quite awhile, I really do want to help, but I felt I had to pick between helping users or helping dev.

Your point is well taken and I will join the dev list so I don't have to post in that way again. On the other hand, the users list has become so busy that more "dev" questions like mine go unanswered. (Which is where I started and received no help, forcing me to begrudingly ask for the dev help)

Now that I have your ear :-), and because you are the only one who has been able to answer this question, I am going to bother you with another one ;-).

Thanks for the info on the ModuleSource. What I want to do is to get the XML cotent from one pipeline and pass it as input to another pipline. Let me write some pseudo-code:

DOM d = getDomFromFirstPipeline( "get-xml" );
DOM d2 = getDomFromSecondPipeline( "get-other-xml" );
DOM d3 = getDomFromOtherPipeline( "other-pipeline", d, d2 ); // pass the first two doms to the other pipeline
sendPage( "final-pipeline", d3 ) // now send final DOM to final-pipeline


The reason I need to do this, is the get-xml and get-other-xml are "pluggable" REST style web services that return XML. other-pipeline is also a "pluggable" REST style web service that takes in XML and returns XML. So, I am basically trying to string these together in either the sitemap directly or in flowscript. It wasn't exactly clear how I would accomplish this with the ModuleSource.

It seems like I could do this more easier if I could use Java/Javascript objects instead of passing DOMs around, but I don't have that luxury as I am talking to "legacy" stuff.

Any help is greatly appreciated. I am going to go join the list again, but if you or anyone else could copy me in again, that would be great.

Irv



Daniel Fagerstrom wrote:

Irv Salisbury III wrote:

I want to use the CIncludeTransformer to call another pipeline and pass it XML using the POST mechanism. Before posting this question, I tried to make my way through the Source code, eventually finding my way to the SitemapSource class. It doesn't look like the cocoon: protocol allows for POST. Is this the case?


The cocoon: protocol doesn't support POST. It is not very likely that it will either. I added POST support to the HTTP: protocol in Bugzilla (http://issues.apache.org/bugzilla/show_bug.cgi?id=24402) for web serivce support. But some people at the list thought that it was going outside the intended scope of resources to make them postable.

I guess a side question is, is there a better way to pass XML to another cocoon pipeline as input to it. It is pretty easy to call another pipeline and get its output, but I want to pass XML to another cocoon pipeline.
I'd be fine with a solution that uses flowscript.


I think the easiest way is using flowscript. You can use the ModuleSource, "module:request:inputStream" (http://wiki.apache.org/cocoon/ModuleSource) to get the input stream.

Then you can use org.apache.cocoon.components.flow.util.PipelineUtil.processToDOM to get the content to a DOM that you after that can put into the pipeline with e.g. JXTemplateGenerator.

/Daniel

P.S.

I am not on the dev list, so if you could copy me in on the answer, that would be great!


It is considered slightly impolite to ask for private copies as it hints that you only want something from us and not are going to contribute. And that can reduce the chance for geting answers. See e.g. http://jakarta.apache.org/site/mail.html and http://www.catb.org/~esr/faqs/smart-questions.html.

You can always read answers through archives: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&r=1&w=2 e.g.



Reply via email to