cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: [patch] esql null column handling
Date Mon, 14 May 2001 20:46:40 GMT
On Mon, 14 May 2001, Matt Sergeant wrote:

> > 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.
>
> In my opinion, if() is why we can put code into the XML. If's in XML look
> like crap. With donald's suggestion you can just use Java's if().

i concur (obviously). you can do what you want to do like so:

<xsp:logic>
  if (<esql:is-null column="foo">) {
    <something/>
  } else {
    <something-else/>
  }
</xsp:logic>

which adds less elements (and complexity) to the esql language. i'll put
in a patch tonight.

- donald


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


Mime
View raw message