- <a href="" target="{$target}"
- onClick="this.href=makeURL('{$target}','{concat($uri,$name)}','{$ann}','{$types}')"
- onMouseOver="window.status='{concat($uri,$name)}'; return true"
- ><xsl:value-of select="$name"/></a>
+ <xsl:variable name="quoteduri">
+ <xsl:call-template name="jsquote">
+ <xsl:with-param name="s" select="$uri"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="quotedname">
+ <xsl:call-template name="jsquote">
+ <xsl:with-param name="s" select="$name"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="quotedbodyname">
+ <xsl:call-template name="jsquote">
+ <xsl:with-param name="s" select="concat($name,'.body')"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="quotedprooftreename">
+ <xsl:call-template name="jsquote">
+ <xsl:with-param name="s" select="concat($name,'.proof_tree')"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$name"/>
+ <xsl:text> </xsl:text>
+ <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedname)}','{$ann}','{$types}'));"
+ onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
+ >
+ <xsl:choose>
+ <xsl:when test="not($body='NO')">Statement</xsl:when>
+ <xsl:otherwise>Definition</xsl:otherwise>
+ </xsl:choose>
+ </a>
+ <xsl:if test="not($body='NO')">
+ <xsl:text> </xsl:text>
+ <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedbodyname)}','{$ann}','{$types}'))"
+ onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
+ >Proof term</a>
+ </xsl:if>
+ <xsl:if test="not($proof_tree='NO')">
+ <xsl:text> </xsl:text>
+ <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedprooftreename)}','{$ann}','{$types}'))"
+ onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
+ >Proof tree</a>
+ </xsl:if>