cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: [C2] (hopefully) last sitemap major changes
Date Sun, 02 Jul 2000 13:22:41 GMT
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="|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.

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

View raw message