http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2744

*** shadow/2744 Mon Jul 23 10:08:24 2001
--- shadow/2744.tmp.7841        Mon Jul 23 10:08:24 2001
***************
*** 0 ****
--- 1,73 ----
+ +============================================================================+
+ | Action in sub-sitemap re-directing using parent sitemap                    |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2744                        Product: Cocoon 2                |
+ |       Status: NEW                         Version: 2.0b1                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Linux                   |
+ |     Priority: Other                     Component: sitemap components      |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                    |
+ |  Reported By: [EMAIL PROTECTED]                                                |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ I'm playing around with actions and I'm finding rather odd behaviour
+ when they're used in sub-sitemaps.  The main sitemap.xmap is that
+ which comes with Cocoon2 out of CVS.  I've added the following
+ pipeline to that sitemap.xmap:
+ 
+   <map:pipeline>
+     <map:match type="regexp"  pattern="^~([^/]*)">
+     <map:mount uri-prefix="~{1}" src="/home/{1}/public_xml/"
+                 check-reload="yes"/>
+    </map:match>
+   </map:pipeline>
+ 
+ This means that a URL like http://localhost/cocoon/~rick/... will
+ go and look at the sitemap in /home/rick/public_xml/sitemap.xmap.
+ This all works fine.
+ 
+ In the /home/rick/public_xml/sitemap.xmap I have something like
+ this:
+ 
+    <map:match pattern="">
+      <map:act type="hello-action">
+        <map:generate src="index.xml"/>
+        <map:transform src="/home/rick/projects/stylesheets/xsl/index-html.xsl"/>
+           <map:serialize type="html"/>
+      </map:act>
+    </map:match>
+ 
+ First, without the <map:act>, </map:act> everything works just wonderfully.
+ The index.xml is transformed using the index-html.xsl transformation
+ sheet.
+ 
+ As soon as I put in the "hello-action" action, my URL gets re-written
+ to be
+ 
+   http://localhost/cocoon/~rick/welcome
+ 
+ from the original
+ 
+   http://localhost/cocoon/~rick/
+ 
+ The re-writing appears to be done in the main sitemap.  The main
+ sitemap has a <map:match> like:
+ 
+    <map:match pattern="">
+     <map:redirect-to uri="welcome"/>
+    </map:match>
+ 
+ It appears that this matcher in the parent sitemap.xmap is being
+ used after the action in my sub-sitemap has completed.
+ 
+ The "hello-action" is just using the org.apache.cocoon.acting.HelloAction
+ class that comes with cocoon2.  The action itself is defined in
+ the sub-sitemap  as:
+ 
+   <map:actions>
+     <map:action name="hello-action" src="org.apache.cocoon.acting.HelloAction"/>
+  </map:actions>

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

Reply via email to