cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [C2: VOTE] Making "test" attributes expandable
Date Thu, 19 Apr 2001 19:31:29 GMT
Davanum Srinivas wrote:
> 
> +1. But can you please post a sample?

This is adapted from a sub-sitemap mounted at "/advertisement" (real world
example):

   <map:match pattern="**.html">
     <map:act set="advertisement">
       <parameter name="dbpool" value="ad-approval"/>
       <map:select>
         <map:when test="&quot;index&quot;.equals({destination})">
           <map:redirect-to uri="/index.html"/>
         </map:when>
         <map:otherwise>
           <map:generate type="serverpages" src="docs/{destination}.xsp"/>
         </map:otherwise>
       </map:select>
       <map:transform src="stylesheets/{action}2form.xsl"/>
       <map:transform src="stylesheets/list2form.xsl"/>
       <map:transform src="stylesheets/form2document.xsl"/>
       <map:transform src="stylesheets/document2agg.xsl"/>
       <map:transform src="stylesheets/agg2html.xsl"/>
       <map:serialize/>
     </map:act>
   </map:match>

This also represents an attempt at content aggregation before Cocoon had it
implemented.

> --- Berin Loritsch <bloritsch@apache.org> wrote:
> > I propose that we make the "test" attributes in selectors expandable.
> > The reason being is that there are cases where I need to make tests
> > on values returned from Actions.  This will make my life alot easier,
> > and possibly other people's as well.
> >
> > I have a NavigationAction in my webapp that tests if a user is logged
> > in and whether they have the permissions to view the resource or not.
> > As a consequence, I need to either redirect the user, or I need to
> > make sure that they get the login page.
> >
> > Since we took away the ability to redirect even from within an Action,
> > we need a nice clean way to test for our redirect values.
> >
> > ---------------------------------------------------------------------
> > 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!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 
> ---------------------------------------------------------------------
> 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