RE: [xsl] Check for attribute

Subject: RE: [xsl] Check for attribute
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 7 Feb 2001 21:32:40 -0000
>     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:

Current Thread