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

Identifying empty elements

Subject: Identifying empty elements
From: Sridhar_Ramachandran@xxxxxx
Date: Wed, 8 Nov 2000 15:24:33 -0800
xsl ignore empty elements
I have a need to identify empty text-only elements and ignore them. The
input document might contain an element in one or more of the following
forms

<SOME_TAG/>
<SOME_TAG  SOME_ATTRIBUTE="some_value"/>
<SOME_TAG>    </SOME_TAG>
<SOME_TAG>some_text_here</SOME_TAG>

For my purpose  all but the last one above are empty elements and need to
be ignored. Is there a simple mechanism for identifying such elements. The
simple xpath expression

//SOME_TAG[. !=''] ignores just the first two cases, but selects the third
one containing the white-space  .

thanks in advance for you help.

rgds

Sridhar


 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.