[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: test for non-null text()

Subject: Re: test for non-null text()
From: Earl Bingham <earl@xxxxxxxxx>
Date: Wed, 03 Nov 1999 15:15:56 -0800
xsl if test not null
I have used the if statement in the past. You could use it in the
following manner:

<xsl:variable name="myVariable"><xsl:value-of
select="Discription[.!="/></xsl:variable>

<!-- test if there is a value -->
<xsl:if test="boolean($myVariable)">
<img src="images/desc.jpg"/>
</xsl:if>

<!-- test if there is NOT a value -->
<xsl:if test="not(boolean($myVariable))">
<h1>Error: no image is currently available</ht>
</xsl:if>

- Earl


Paul Johnson wrote:

> Hello All,
>
> How can I test to see if a element is NOT null?
> I have tried the following:
>
> <xsl:if test="Discription[.!='']"><img src="images/desc.jpg"/></xsl:if>
>
> <xsl:if test="Discription != ''><img src="images/desc.jpg"/></xsl:if>
>
> <xsl:if test="Discription $ne$ ''"<img src="images/desc.jpg"/></xsl:if>
>
> I am not sure where to look now.
>
> Thanks,
>
> Paul R. Johnson
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
begin:vcard 
n:Bingham;Earl
tel;cell:(408) 806-6642
tel;fax:(650) 559-1738
tel;home:(650) 559-1738
tel;work:(408) 993-2140
x-mozilla-html:FALSE
url:http://www.b-bop.com
org:B-Bop Associates Inc.;Engineering
adr:;;2 North First Street;San Jose;CA;94024;USA
version:2.1
email;internet:earl@xxxxxxxxx
title:Senior Software Engineer
note:"Live Free Or Die"
fn:Earl Bingham
end:vcard
Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.