Maybe a really dumb question, but how do you test an attribute?

<xsl:if test=".[@id = '30']">
do stuff
</xsl:if>

doesn't seem to work. Is there a better way?