Re: Using xsl:if to determine if a node is empty.

Subject: Re: Using xsl:if to determine if a node is empty.
From: Gary L Peskin <garyp@xxxxxxxxxxxx>
Date: Fri, 15 Sep 2000 14:05:35 -0700
Jeni Tennison wrote:
> If you want to use a variable to hold an empty string to test against, you
> should probably define it as:
> 
>   <xsl:variable name="empty_string" select="''" />
> 
> as this creates an empty *string* rather than an empty 'result tree fragment'.

Jeni --

I'm not sure if you or others realize this since I just learned it
myself (:)) but

  <xsl:variable name="empty_string"/>

is equivalent to your expression (XSLT Spec 11.2).  However, I don't
think that this is working in XalanJ at the moment so your form is
definitely safer until I get in the patch for that bug.

Gary


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread