This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Checking null values in a string
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 6 Aug 2002 17:56:33 +0100
- Subject: RE: [xsl] Checking null values in a string
- Reply-to: xsl-list at lists dot mulberrytech dot com
> I wonder if there is some good useful function that checks if
> a for example variable is empty and in that case replaces it
> with an empty string. There is one good function in PL/SQL
> that does this. The NVL function. If there is no value just
> replace it with an empty string. Is there anything similar in XSLT?
>
string(@x)
gives you the value of @x if it exists and an empty string if it
doesn't. Is that what you're after?
Your terminology is a little confusing: what do you mean by null values
in an XML context?
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list