<xsl:choose>
<!-- <xsl:when test="//InnerTypes and boolean(key('typeid',*/@id))"> -->
<!-- start looking for subproofs -->
- <xsl:when test="((*/@id) = (//InnerTypes/TYPE/@of))">
+ <!-- <xsl:when test="((*/@id) = (//InnerTypes/TYPE/@of))"> -->
+ <xsl:when test="//InnerTypes and count(*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]) > 0">
<m:apply helm:xref="{@id}">
<m:csymbol>letin</m:csymbol>
<!-- <xsl:for-each select="*[boolean(key('typeid',@id))]"> -->
<xsl:template match="*" mode="flat">
<xsl:param name="n" select="1"/>
+ <xsl:variable name="id" select="@id"/>
<xsl:choose>
- <xsl:when test="@id">
- <xsl:variable name="id" select="@id"/>
- <xsl:choose>
- <!-- <xsl:when test="key('typeid',@id)"> -->
- <xsl:when test="//InnerTypes/TYPE[@of=$id]">
- <m:ci>
- <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="concat('h',$n)"/></xsl:with-param></xsl:call-template>
- </m:ci>
- <xsl:apply-templates mode="flat" select="following-sibling::*[1]">
- <xsl:with-param name="n" select="$n+1"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="pure" select="."/>
- <xsl:apply-templates mode="flat" select="following-sibling::*[1]">
- <xsl:with-param name="n" select="$n"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
+ <!-- <xsl:when test="key('typeid',@id)"> -->
+ <!-- <xsl:when test="//InnerTypes/TYPE[@of=$id]"> -->
+ <xsl:when test="//InnerTypes and @sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')">
+ <m:ci>
+ <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="concat('h',$n)"/></xsl:with-param></xsl:call-template>
+ </m:ci>
+ <xsl:apply-templates mode="flat" select="following-sibling::*[1]">
+ <xsl:with-param name="n" select="$n+1"/>
+ </xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates mode="pure" select="."/>
<xsl:template match="LAMBDA" mode="noannot">
<xsl:variable name="id" select="@id"/>
<xsl:choose>
- <xsl:when test="@sort='Prop' and name(../..) != 'LAMBDA'">
+ <xsl:when test="//InnerTypes and @sort='Prop' and name(../..) != 'LAMBDA'">
<!-- <xsl:when test="@sort='Prop' and //InnerTypes/TYPE[@of=$id]"> -->
<xsl:call-template name="has_inner_type"/>
</xsl:when>
<xsl:choose>
<!-- <xsl:when test="//InnerTypes and key('typeid',@id)"> -->
<!-- <xsl:when test="//InnerTypes/TYPE[@of=$id]"> -->
- <xsl:when test="@sort='Prop'">
+ <xsl:when test="//InnerTypes and @sort='Prop'">
<xsl:call-template name="has_inner_type"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates mode="noannot" select="."/>
</xsl:when>
<!--**** Fine Patch temporanea, per il problema dei threads ***-->
- <xsl:when test="count(*[@id = //InnerTypes/TYPE/@of]) = 1">
+ <xsl:when test="//InnerTypes and count(*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]) = 1">
<xsl:variable name="id" select="@id"/>
<m:apply helm:xref="{@id}">
<m:csymbol>thread</m:csymbol>