You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Rick Tessner <ri...@dingle.myra.com> on 2001/07/20 23:10:59 UTC

[C2] Actions in sub-sitemaps and some odd behaviour

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


Re: [C2] Actions in sub-sitemaps and some odd behaviour

Posted by Davanum Srinivas <di...@yahoo.com>.
Rick,

Can you please add this as a bug @ http://nagoya.apache.org/bugzilla? This will let everyone track
this problem.

Thanks,
dims

--- Rick Tessner <ri...@dingle.myra.com> wrote:
> 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
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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