This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How can I test if element is empty?
- To: "Xsl-List" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] How can I test if element is empty?
- From: "Denis Kranjcec" <denis dot kranjcec at zpm dot fer dot hr>
- Date: Tue, 20 Mar 2001 12:09:58 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi
So,how can I test if element is empty with xsl?
example element
<elem/> or <elem></elem>
I have tried this
<xsl:choose>
<xsl:when test="string-length(elem)">
<xsl:value-of select="elem"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="NOelem"/>
</xsl:otherwise>
</xsl:choose>
and this
<xsl:when test="elem == ''">
but that don't work
Thanks in advance
Denis Kranjcec
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list