<xsl:variable name="name">
<xsl:value-of select="m:csymbol"/>
</xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
<xsl:choose>
<!-- FORALL -->
<xsl:when test="$name='forall'">
<xsl:apply-templates select="*[3]" mode="inline"/>
<xsl:text>[</xsl:text>
<xsl:apply-templates select="*[4]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[2]" mode="inline"/>
<xsl:text>]</xsl:text>
</xsl:when>
<SUB>
<xsl:apply-templates select="*[3]" mode="inline"/>
</SUB>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<SUP>
<xsl:apply-templates select="*[4]" mode="inline"/>
</SUP>
</xsl:when>
<xsl:when test="$name='lift'">
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<SUP>
<xsl:apply-templates select="*[2]" mode="inline"/>
</SUP>
<!-- reduction -->
<xsl:when test="$name='beta_red1'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <SUB>
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="'beta'"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </SUB>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<xsl:when test="$name='beta_red'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <SUB>
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="'beta'"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <xsl:text>*</xsl:text>
- </SUB>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <xsl:text>*</xsl:text>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <xsl:text>*</xsl:text>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<xsl:when test="$name='par_beta_red1'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <SUB>
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="'beta'"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </SUB>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<xsl:when test="$name='par_beta_red'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <SUB>
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="'beta'"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <xsl:text>*</xsl:text>
- </SUB>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <xsl:text>*</xsl:text>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <xsl:text>*</xsl:text>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<!-- forgetful -->
<xsl:when test="$name='forgetful'">
- <a href="{*[1]/@definitionURL}">|</a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">|</a>
+ </xsl:when>
+ <xsl:otherwise>
+ |
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">|</a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">|</a>
+ </xsl:when>
+ <xsl:otherwise>
+ |
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<!-- boolean algebra of redexes -->
<!-- isomorphic -->
<xsl:when test="$name='isomorphic'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
</xsl:variable>
<!-- <xsl:value-of select="$current_indent"/> -->
<!-- <xsl:value-of select="$charlength"/> -->
+ <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
<xsl:choose>
<!-- FORALL -->
<xsl:when test="$name='forall'">
<xsl:apply-templates select="*[3]"/>
<xsl:text>[</xsl:text>
<xsl:apply-templates select="*[4]"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'blue'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'blue'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'blue'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[2]"/>
<xsl:text>]</xsl:text>
</xsl:when>
<SUB>
<xsl:apply-templates select="*[3]" mode="inline"/>
</SUB>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<SUP>
<xsl:apply-templates select="*[4]" mode="inline"/>
</SUP>
</xsl:when>
<xsl:when test="$name='lift'">
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<SUP>
<xsl:apply-templates select="*[2]" mode="inline"/>
</SUP>
<!-- reduction -->
<xsl:when test="$name='beta_red1'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <SUB>
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="'beta'"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </SUB>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<xsl:when test="$name='beta_red'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <SUB>
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="'beta'"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <xsl:text>*</xsl:text>
- </SUB>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <xsl:text>*</xsl:text>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <xsl:text>*</xsl:text>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<xsl:when test="$name='par_beta_red1'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <SUB>
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="'beta'"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </SUB>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<xsl:when test="$name='par_beta_red'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <SUB>
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="'beta'"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- <xsl:text>*</xsl:text>
- </SUB>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <xsl:text>*</xsl:text>
+ </SUB>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <SUB>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="'beta'"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ <xsl:text>*</xsl:text>
+ </SUB>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<!-- forgetful -->
<xsl:when test="$name='forgetful'">
- <a href="{*[1]/@definitionURL}">|</a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">|</a>
+ </xsl:when>
+ <xsl:otherwise>
+ |
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">|</a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">|</a>
+ </xsl:when>
+ <xsl:otherwise>
+ |
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<!-- boolean algebra of redexes -->
<!-- isomorphic -->
<xsl:when test="$name='isomorphic'">
<xsl:apply-templates select="*[2]" mode="inline"/>
- <a href="{*[1]/@definitionURL}">
- <xsl:call-template name="mksymbol-1">
- <xsl:with-param name="symbol" select="$name"/>
- <xsl:with-param name="color" select="'green'"/>
- <xsl:with-param name="size" select="'+0'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-1">
+ <xsl:with-param name="symbol" select="$name"/>
+ <xsl:with-param name="color" select="'green'"/>
+ <xsl:with-param name="size" select="'+0'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]" mode="inline"/>
</xsl:when>
<xsl:template mode="inline" match="m:apply[m:and|m:or|m:eq|m:neq|m:leq|m:lt
|m:geq|m:gt|m:plus|m:times]">
- <xsl:variable name="uri">
- <xsl:value-of select="*[1]/@definitionURL"/>
- </xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
<xsl:text>(</xsl:text>
<xsl:apply-templates mode="inline" select="*[2]"/>
- <a href="{$uri}">
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="local-name(*[1])"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
<xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="local-name(*[1])"/>
+ <xsl:with-param name="symbol" select="local-name(*[1])"/>
</xsl:call-template>
- </a>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates mode="inline" select="*[3]"/>
<xsl:text>)</xsl:text>
</xsl:template>
<!-- INLINE MODE - MINUS (can be unary!) -->
<xsl:template mode="inline" match="m:apply[m:minus]">
- <xsl:variable name="uri">
- <xsl:value-of select="*[1]/@definitionURL"/>
- </xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
<xsl:choose>
<xsl:when test="count(child::*)=2">
- <a href="{$uri}">
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'minus'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
<xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="'minus'"/>
+ <xsl:with-param name="symbol" select="'minus'"/>
</xsl:call-template>
- </a>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates mode="inline" select="*[2]"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>(</xsl:text>
<xsl:apply-templates mode="inline" select="*[2]"/>
- <a href="{$uri}">
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'minus'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
<xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="'minus'"/>
+ <xsl:with-param name="symbol" select="'minus'"/>
</xsl:call-template>
- </a>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates mode="inline" select="*[3]"/>
<xsl:text>)</xsl:text>
</xsl:otherwise>
<!-- INLINE MODE NOT -->
- <xsl:template mode="inline" match="m:apply[m:not]">
- <xsl:variable name="uri">
- <xsl:value-of select="m:not/@definitionURL"/>
- </xsl:variable>
- <a href="{$uri}">
- <xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="'not'"/>
- </xsl:call-template>
- </a>
- <xsl:apply-templates mode="inline" select="*[2]"/>
- </xsl:template>
+<xsl:template mode="inline" match="m:apply[m:not]">
+ <xsl:variable name="uri"><xsl:value-of select="m:not/@definitionURL"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'not'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'not'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates mode="inline" select="*[2]"/>
+</xsl:template>
<!-- INLINE MODE EXISTS -->
<xsl:template mode="inline" match="m:apply[m:exists]">
- <xsl:variable name="uri">
- <xsl:value-of select="m:exists/@definitionURL"/>
- </xsl:variable>
- <a href="{$uri}">
+ <xsl:variable name="uri"><xsl:value-of select="m:exists/@definitionURL"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'exists'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
<xsl:call-template name="mksymbol-init">
<xsl:with-param name="symbol" select="'exists'"/>
</xsl:call-template>
- </a>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates mode="inline" select="m:condition"/>
|m:geq|m:gt|m:plus|m:times]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="*[1]/@definitionURL"/>
- </xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
<xsl:variable name="charlength">
<xsl:apply-templates select="*[1]" mode="charcount"/>
</xsl:variable>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
- <a href="{$uri}">
- <xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="local-name(*[1])"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="local-name(*[1])"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="local-name(*[1])"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:apply-templates>
<xsl:template match="m:apply[m:minus]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="*[1]/@definitionURL"/>
- </xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="*[1]/@definitionURL"/></xsl:variable>
<xsl:choose>
<xsl:when test="count(child::*)=2">
- <a href="{$uri}">
- <xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="'minus'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'minus'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'minus'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[2]">
<xsl:with-param name="current_indent" select="$current_indent + 1"/>
</xsl:apply-templates>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
- <a href="{$uri}">
- <xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="'minus'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'minus'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'minus'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="*[3]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:apply-templates>
<!-- NOT -->
- <xsl:template match="m:apply[m:not]">
+<xsl:template match="m:apply[m:not]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:not/@definitionURL"/>
- </xsl:variable>
- <a href="{$uri}">
- <xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="'not'"/>
- </xsl:call-template>
- </a>
- <xsl:apply-templates select="*[2]"/>
+ <xsl:variable name="uri"><xsl:value-of select="m:not/@definitionURL"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'not'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'not'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates select="*[2]"/>
</xsl:template>
<!-- EXISTS -->
<xsl:template match="m:apply[m:exists]">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="m:exists/@definitionURL"/>
- </xsl:variable>
+ <xsl:variable name="uri"><xsl:value-of select="m:exists/@definitionURL"/></xsl:variable>
<xsl:variable name="charlength">
<xsl:apply-templates select="m:exists" mode="charcount"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
- <a href="{$uri}">
- <xsl:call-template name="mksymbol-init">
- <xsl:with-param name="symbol" select="'exists'"/>
- </xsl:call-template>
- </a>
+ <xsl:choose>
+ <xsl:when test="$uri != ''">
+ <a href="{$uri}">
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'exists'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="mksymbol-init">
+ <xsl:with-param name="symbol" select="'exists'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="m:condition">