Identifying empty elements

Subject: Identifying empty elements
From: Sridhar_Ramachandran@xxxxxx
Date: Wed, 8 Nov 2000 15:24:33 -0800
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