This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Check for attribute
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Check for attribute
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Wed, 7 Feb 2001 21:32:40 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> How can I check if an attribute (or element) exists or not ?
Try to select it; if it doesn't exist, the result is an empty node-set,
which converts to the boolean false.
E.g. <xsl:if test="@attribute">
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list