This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: find out if an attribute exist
- From: Greg Faron <gfaron at integretechpub dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 07 May 2002 10:21:08 -0600
- Subject: Re: [xsl] find out if an attribute exist
- Reply-to: xsl-list at lists dot mulberrytech dot com
At 10:11 AM 5/7/2002, you wrote:
>I need to do one thing if a specific attribute exists on an element and
>something else if it does not. How do I do this?
<xsl:choose>
<xsl:when test="element/@attribute">
do one thing
</xsl:when>
<xsl:otherwise>
do something else
</xsl:otherwise>
</xsl:choose>
Greg Faron
Integre Technical Publishing Co.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list