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

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
xslt determine node empty
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

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.