<xslt:template name="exit">
<xslt:param name="str"/>
<xslt:param name="max"/>
<xslt:param name="pos"/>
<xslt:param name="sofar"/>
<n><xslt:value-of
select="substring($sofar, 1, string-length($sofar) - 1)"/></n>
<xslt:choose>
<xslt:when test="$pos != $max">
<xslt:call-template>
<xsl:attribute name="name">
<xsl:value-of select="//fs/state[1]/name"/>
</xsl:attribute>
<xslt:with-param name="str" select="substring($str,1)"/>
<xslt:with-param name="max" select="$max"/>
<xslt:with-param name="pos" select="$pos + 1"/>
</xslt:call-template>
</xslt:when>
<xslt:otherwise>
<unused><xslt:value-of select="substring($str,1)"/></unused>
</xslt:otherwise>
</xslt:choose>
</xslt:template>