This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how can check whether an attribute exists or not?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] how can check whether an attribute exists or not?
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Wed, 31 Jan 2001 09:09:26 GMT
- References: <800153F5FB9AD2119E8E004033A0B7DF6562D5@mail.ceanet.com.au>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> <xsl:when test="@href=''">
That tests if the string value is empty, which is true if there isn't an
attribute or of it s explictly empty.
<xsl:when test="@href">
would test if there is an attribute at all. (Becuae @href selects the
node set of href attributes, and empty nodes sets count as false in a
boolean test)
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list