Stefano Mazzocchi a écrit :
>
> Berin Loritsch wrote:
>
> > > The real question is: are those unmatched action useful in real life?
> >
> > Yes. Here are two examples:
> >
> > 1) Themed Site
> > The Action will determine what theme to apply to the site (I did this using
> > session to maintain the theme once the user selected it). Currently, I have
> > that Action as the root of every single <map:match> in the sitemap. It would
> > be more usefull to have this:
> >
> > <map:act type="theme-selector">
> > <map:match>...</map:match>
> > <map:match>...</map:match>
> > <map:match>...</map:match>
> > <map:match>...</map:match>
> > </map:act>
> >
> > 2) Authenticated Site
> > It would be useful (especially for child sitemaps) to have an authentication
> > action happen before any protected resource can be selected. In many corporate
> > webapps, the entire site must be protected.
>
> Makes perfect sense.
>
> Ok, I think Berin identified the need for unmatched actions, now, let's
> get a little deeper, please, answer these questions:
>
> do you see the need for 'pre/post' matching actions?
>
> do you see the need for 'intra-matching' actions?
Another criteria that should be taken in to account is : does the action
have pipeline-building children or not ?
The "theme-selection" action above can be either pre/intra/post-matching
depending on the precedence order of URL patterns. An intra-matching
example :
<!-- non-themed high precedence URL patterns -->
<map:match>...</map:match>
<!-- themed URL patterns -->
<map:act type="theme-selection">
<map:match>...</map:match>
<map:match>...</map:match>
</map:act>
<!-- non-themed low precedence URL patterns -->
<map:match>...</map:match>
With this new criteria :
+1 for pre/intra/post-matching non-empty actions
+1 for pre-matching empty actions : this can be used to setup some
application-level context
-0 for intra/post-matching empty actions : I don't see any real
usefullness for them.
Sylvain
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]