I think that should work, although I would have defined a variable to hold the local-name string so you wouldn’t have to repeat string(local-name()) every time.
But I suspect that a better way to do this to replace your xsl:if with an xsl:apply-templates statement using a mode:
<xsl:apply-templates select='.' mode='x'/>
…
<xsl:template match='frame|repeatingFrame|field|text' mode='x'>
<!-- whatever you were going to put in your xsl:if statement -->
</xsl:template>
#Tamino#API-Management#webMethods