Date: 2004-08-27T03:54:27
   Editor: NicoVerwer <[EMAIL PROTECTED]>
   Wiki: Cocoon Wiki
   Page: Redirecting
   URL: http://wiki.apache.org/cocoon/Redirecting

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -60,3 +60,35 @@
 }}}
 
 This isn't nice, but there really doesn't seem to be any sane way in "vanilla" 
Cocoon where sitemap actions can be influenced by the content being processed. 
I don't want to use !FlowScript, XSP or any of the peripherals.
+
+----
+Yet another reply:
+
+The redirect attempted by the previous reply can be done using the cinclude 
transformer.
+In your pipeline, this looks like:
+
+{{{
+        <map:transform src="redirect-include.xsl">
+          <map:parameter name="uri" value="{request-attr:my-parameter}"/>
+        </map:transform>
+        <map:transform type="cinclude"/>
+}}}
+
+The stylesheet 'redirect-include.xsl' is simply:
+
+{{{
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+>
+
+  <xsl:param name="uri"/>
+
+  <xsl:template match="/">
+    <ci:include src="{$uri}" xmlns:ci="http://apache.org/cocoon/include/1.0"/>
+  </xsl:template>
+
+</xsl:stylesheet>
+}}}
+
+After cinclude has done its work, the rest of the original pipeline is 
executed, so you will need at least a serializer after cinclude.