cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphael Luta <luta.raph...@networks.vivendi.net>
Subject Re: [C2 & patch] Re: Matchers and Selectors (was Re: Better and Betterand RT)
Date Mon, 13 Nov 2000 09:04:43 GMT
Giacomo Pati wrote:
> 
> Marcus Crafter wrote:
> >
> > On Thu, 9 Nov 2000, Giacomo Pati wrote:
> >
> > > The concept of a Matcher is much more general. You can easily write a
> > > Matcher that matches "high load on the servel" or alike.
> >
> >         *nod*.. sounds good.
> >
> > > How about his:
> > >
> > >    <select type="paramselector">
> > >      <when test="myparameter = on">
> > >        ...
> > >      </when>
> > >      <when test="yourparameter = on">
> > >        ...
> > >      </when>
> > >      <otherwise>
> > >        ...
> > >      </otherwise>
> > >    </select>
> >
> >         Excellent idea. I'm putting it together at the moment. Note for the
> >         above example to work, we'll need to add = to the call to 'translate' in
> >         sitemap.xsl (when 'generate-name' is called, otherwise the = sign is
> >         added to the generated class variable name causing a compiler error).
> 
> Oh, yes of course, I didn't think of. Maybe it's better to get rid of
> trying to derivate names from the pattern and generate pure names with
> generate-id().
> 
> >         I also though about implementing 'greater than' and 'less than'
> >         operators too. Over time I would like to expand the set of operators
> >         to include many varied tests. ie:
> 
> Why not. But keep in mind your operators are used by admin people not by
> programmers (and with admin people i don't meant sys admins :). So
> please keep it as simple and understandable as possible.
> 
> You can use an "is" instead of "=" (good old COBOL is comming back :])
> 

I'd rather have UNIX shell like operators name (my own background ;) )
eq for equal
ne for not equal
lt for lower than
gt for greater than
le for lower or equal
...

This avoids the use of restricted characters, covers all the needed operators
and is pretty intuitive for any English speaker or UNIX shell user.

--
Raphaƫl Luta - luta.raphael@networks.vivendi.net

Mime
View raw message