try <xsl:template match="//GROUP"> <xsl:if test="./@name"> Do some stuff. </xsl:if> </xsl:template>
That falls into the category of "if your car won't start, kick the tyres and try again". Michael Kay