Tags don't exist in XSLT - you mean "element node".
If the element node in question is the context node, use
<xsl:if test="@a">
to test whether it has an attribute named a.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference