cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sérgio Carvalho <sergio.carva...@acm.org>
Subject Re: [patch] esql null column handling
Date Sun, 13 May 2001 17:09:31 GMT
On Mon, 14 May 2001 17:28:26 +0100 (BST)
Matt Sergeant <matt@sergeant.org> wrote:

> On Sun, 13 May 2001, Sérgio Carvalho wrote:

> >  <esql:row-results>
> >  ...
> >   <esql:when-null column="foo">
> >    <esql:when-null-true>
> >     ...
> >    </esql:when-null-true>
> >    <esql:when-null-false>
> >     ...
> >    </esql:when-null-false>
> >   </esql:when-null>
> 
> This seems a bit verbose to me... Can't we find a simpler way to handle
> nulls?
> 

This is basically an if-then-else. The whole structure is depicted, and in the end it is not
much more complex than a complete if-then-else. You may obviously have only the when-null-true
or only the when-null-false child elements. 

Assuming one child element is used much more often  - e.g when-null-true - this can be simplified
to:
   <esql:when-null column="foo">
    (null-true processed elements)
    <esql:when-null-false>
     (null-false processed elements)
    </esql:when-null-false>
   </esql:when-null>
but I truly think the most common situation is that of a complete if-then-else, and the first
syntax is then the best one.

Opinions?

Sergio

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message