Well, to reply to my own message, I didn't find any mention of additional "is-null" commands like "is-null-true" or "is-null-false" in the esql.xsl page, but I was able to get my code to use the "is-null" returned Java boolean value in an <xsp:logic> block to determine whether I should concat the LocationNumber to LocationName if the LocationNumber was not null and was not "blank".
<xsp:logic>
String locNbr = "";
if( !(<esql:is-null column="location_nbr"/>) && !<esql:get-string
column="location_nbr"/>.equals( "" ) )
{
locNbr = " #" + <esql:get-string column="location_nbr"/>;
</xsp:logic>
<locationname><esql:get-string
column="location_name"/><xsp:expr>locNbr</xsp:expr></locationname>
Are there any plans to add the "is-null-true" or "is-null-false" commands?
(actually the previous message in the archives described them as
"when-null-true" and "when-null-false" [ref:
http://www2.real-time.com/pipermail/cocoon-devel/2001-May/007585.html]
Just curious... I suppose I could add them to the esql.xsl myself, but I'm
leery of adding a "hack" that will get overwritten with a later version of a
Cocoon install.
Mark
-----Original Message-----
From: Mark S. Kent [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 2:29 PM
To: [EMAIL PROTECTED]
Subject: C2: esql:if-null
<esql:if-null column="colname">
Has anyone used this yet? What is the exact syntax for the esql statement?
The ESQL Taglib page is rather sparse explaining it and the only message in
the archives was suggestions on how to implement it.
I have a Location name/nbr string that I want to create like this:
"{LocationName} #{LocationNumber}"
but sometimes the number is "null" so I want to just see this instead:
"{LocationName}"
TIA!
Mark
<<attachment: winmail.dat>>
--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
