cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Tessner <r...@dingle.myra.com>
Subject [C2] Actions in sub-sitemaps and some odd behaviour
Date Fri, 20 Jul 2001 21:10:59 GMT
Hi all,

I'm playing around with actions and I'm finding rather odd behaviour
when they're used in sub-sitemaps.  Here's what I have in 
my main 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 is something that is done in the main sitemap. I'm just
using the sitemap.xmap that comes with cocoon2 and added the little
<map:pipeline> shown in (*) above.  The main sitemap has a 

   <map:match pattern="">
    <map:redirect-to uri="welcome"/>
   </map:match>

but why would that be being used by my sub-sitemap when a 
<map:act> is included?

The "hello-action" is just using the org.apache.cocoon.acting.HelloAction
class that comes with cocoon2.

-- 
Rick Tessner	rick@myra.com
MYRA Systems Corp. Fone: (250) 381 1335 x125  Phax: (250) 381 1304
                   Cell: (250) 885 9452

"Time grabs you by the wrist, directs you where to go.
 So make the best of this test and don't ask why.'


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message