cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: Sitemap Substitution
Date Tue, 22 May 2001 20:41:22 GMT


On Mon, 21 May 2001, Jason Foster wrote:

> This message will probably reveal my ignorance more than anything, but
> here goes...
>
> Right now a common idiom in the sitemap is to substitute values from
> previous activities.  A simple example is:
>
>    <map:match pattern="images/**.gif">
>     <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
>    </map:match>
>
> We also have the ability to nest things using the {../../1} notation.
>
> Now that matchers and actions can both add things to the
> [environment/actionMap/controller thingy] I can see all sorts of namespace
> problems developing.

Why? Every element that may return a map to the sitemap is in its own
hierarchy. So clashes can only happen inside one single component
(action/matcher)

Look:

   <map:match pattern="foo/**">
     <map:match pattern="foo/*/**">
       <map:match pattern="foo/*/*/**>
         <map:generate type="xsp" src="...">
           <!-- from first matcher -->
           <map:parameter name="main" value="{../../1}"/>
           <!-- from second matcher -->
           <map:parameter name="sub1" value="{../1}"/>
           <!-- from second matcher -->
           <map:parameter name="sub1-rest" value="{../2}"/>
           <!-- from third matcher -->
           <map:parameter name="last1" value="{1}"/>
           <!-- from third matcher -->
           <map:parameter name="last2" value="{2}"/>
           <!-- from third matcher -->
           <map:parameter name="last3" value="{3}"/>
         </map:generate>
      </map:match>
    </map:match>
  </map:match>

So, why should they clash and need a additional axis?

Giacomo

>
> Would it make sense to add the notion of an axis (sort of like XPath) to
> the substitution?  For example:
>
>   {action::result}
>   {request::password}
>   {session::userid}
>   {match::1}
>
> As usual this idea comes from my attempts to use Actions to control the
> flow through my webapp.  I have been trying to understand exactly how to
> implement control flow logic and have become more and more confused.
>
> Comments?
>
> Jason Foster
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>


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


Mime
View raw message