cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: [C2] (hopefully) last sitemap major changes
Date Sun, 02 Jul 2000 17:37:26 GMT
On Sun, Jul 02, 2000 at 03:22:41PM +0200, Stefano Mazzocchi wrote:
> Giacomo Pati wrote:
> > 
> > Stefano Mazzocchi wrote:
> > 
> > As one looks into the sitemap WD in the CVS it seems that the
> > <map:match> element is the top element of a resource pipe. I guess it's
> > still true that such a pipe can be formed as (even if it somehow doesn't
> > make sense):
> > 
> >    <map:choose type="ip-filter">
> >     <map:when test="allowsAddress()">
> >      <map:match pattern="cocoon/dist/*">
> >       <map:redirect-to uri="dist/cocoon/{1}"/>
> >      </map:match>
> >     </map:when>
> >     <map:otherwise>
> >      <map:redirect-to resource="Access refused"/>
> >     </map:otherwise>
> >    </map:choose>
> 
> Well, I think the <match> should be the only one allowed. It makes it
> more declarative... just like XSLT has only <template> to start from.
> 
> To me, it doesn't make any sense to start a declaration with a "if it's
> this" without returning what it is.
> 
> So, instead of
> 
>  <map:choose type="ip-filter">
> 
> I would do
> 
>  <map:match type="ip" pattern="127.0.0.1|192.123.*.*|10.2.38.*">
> 
> I could not find a place where <choose> could start a pipe.... but if
> you have any idea, I'm more than happy to change my mind.

No, I also think that having a <match> the only tag directly under <pipeline>
is much cleaner. I've only wanted to make it clear for everybody.

Giacomo
 
-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch


Mime
View raw message