Adam Ratcliffe wrote:
Try cocoon.processPipelineTo(uri, null/*no bizdata*/, output), sorry I wrote the
example from memory. The link to the relevant documentation is:
http://cocoon.apache.org/2.1/userdocs/flow/api.html#processPipelineTo


Hi Adam,
Thanks a lot for your attention. I'm getting closer to the solution, but I'm not yet there.


What I'm now having is sitemap and flowscript as given below, where "Quelle" is something like <http://linuxtoday.com/news_story.php3?ltsn=2005-04-05-006-26-OS-DP-NT>.


sitemap.xmap ------------------------------- <map:flow language="javascript"> <map:script src="redirect.flow"/> </map:flow> <map:pipeline> <map:match pattern="LinuxLink"> <map:call function="processLinks"/> </map:match> </map:pipeline> -------------------------------


redirect.flow ------------------------------- function processLinks() { var uri = cocoon.request.getParameter("Quelle"); var output = new Packages.java.io.ByteArrayOutputStream(); cocoon.processPipelineTo(uri, null/*no bizdata*/, output); var redirectUri = output.toString(); cocoon.redirectTo(redirectUri); } -------------------------------


With this, I'm still getting errors like
-------------------------------
An Error Occurred
protocol = http host = null
org.apache.avalon.framework.CascadingRuntimeException: "file:/path/to/flowscript/redirect.flow", line 4: uncaught JavaScript exception: at processLinks (file:/path/to/flowscript/redirect.flow, Line 4): org.apache.excalibur.source.SourceException: Cannot get input stream for cocoon://http://linuxtoday.com/news_story.php3?ltsn=2005-04-05-010-26-RV-HE-SV


cause: java.lang.IllegalArgumentException: protocol = http host = null
-------------------------------


What I'd need I think is something like

       var uri = cocoon:/"myOtherPipe"

to get the desired input stream, but I cannot find the correct command for that.

Isn't there an easier solution for making (xpath of) SAX stream available to the sitemap?
--
[EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to