<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena -->
<!--***********************************************************************-->
-<xsl:param name="getterURL" select="'http://localhost:8081/'"/>
-<xsl:param name="processorURL" select="'http://localhost:8080/helm/servlet/uwobo/'"/>
-<xsl:param name="keys" select="'C1,HC2'"/>
-<xsl:param name="naturalLanguage" select="'yes'"/>
-<xsl:param name="annotations" select="'no'"/>
-
-<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getxml?uri=</xsl:variable>
-
-<xsl:variable name="header"><xsl:value-of select="$processorURL"/>apply?keys=<xsl:value-of select="$keys"/>&param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&param.annotations=<xsl:value-of select="$annotations"/>&param.keys=<xsl:value-of select="$keys"/>&param.getterURL=<xsl:value-of select="$getterURL"/>&param.processorURL=<xsl:value-of select="$processorURL"/>&xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
-
<xsl:include href="html_init.xsl"/>
<xsl:include href="html_set.xsl"/>
<xsl:include href="html_reals.xsl"/>
<xsl:variable name="showcast" select="0"/>
-<xsl:template name="makeURL">
- <xsl:param name="url" select="''"/>
- <xsl:value-of select="concat(string($header),string($url),'&param.CICURI=',string($url))"/>
-</xsl:template>
-
<!--***********************************************************************-->
<!-- HTML Head and Body -->
<!--***********************************************************************-->
<xsl:template mode="inline" match="m:ci">
<xsl:choose>
<xsl:when test="boolean(@definitionURL)">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="@definitionURL"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{@definitionURL}">
<xsl:apply-templates/>
</a>
</xsl:when>
<xsl:template match="m:ci">
<xsl:choose>
<xsl:when test="boolean(@definitionURL)">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="@definitionURL"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{@definitionURL}">
<xsl:apply-templates/>
</a>
</xsl:when>
<xsl:param name="getterURL" select="'http://localhost:8081/'"/>
<xsl:param name="processorURL" select="'http://localhost:8080/helm/servlet/uwobo/'"/>
<!-- Keys contains the keys of the stylesheets to be applied following links-->
-<xsl:param name="keys" select="'C1,C2'"/>
+<xsl:param name="keys" select="'C1,HC2,L'"/>
<!-- Thkeys contains the keys of the stylesheets to be applied at the first
step for expanding objects -->
-<xsl:param name="thkeys" select="'TC1,C2'"/>
+<xsl:param name="thkeys" select="'TC1,HC2,L'"/>
<xsl:param name="naturalLanguage" select="'yes'"/>
<xsl:param name="annotations" select="'no'"/>
+<xsl:param name="media-type" select="'xhtml'"/>
+<xsl:param name="doctype-public" select="'-//W3C//DTD XHTML 1.0 Transitional//EN'"/>
+<xsl:param name="encoding" select="iso-8859-1"/>
<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getxml?uri=</xsl:variable>
-<xsl:variable name="header"><xsl:value-of select="$processorURL"/>apply?keys=<xsl:value-of select="$thkeys"/>&param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&param.annotations=<xsl:value-of select="$annotations"/>&param.keys=<xsl:value-of select="$keys"/>&param.getterURL=<xsl:value-of select="$getterURL"/>&param.processorURL=<xsl:value-of select="$processorURL"/>&xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
+<xsl:variable name="header"><xsl:value-of select="$processorURL"/>apply?keys=<xsl:value-of select="$thkeys"/>&param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&param.annotations=<xsl:value-of select="$annotations"/>&prop.media-type=<xsl:value-of select="$media-type"/>&prop.doctype-public=<xsl:value-of select="$doctype-public"/>&prop.encoding=<xsl:value-of select="$encoding"/>&param.keys=<xsl:value-of select="$keys"/>&param.getterURL=<xsl:value-of select="$getterURL"/>&param.processorURL=<xsl:value-of select="$processorURL"/>&xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
+
<xsl:output
method="xml"
+
+
+
+
+
</xsl:variable>
<xsl:text>(</xsl:text>
<xsl:apply-templates mode="inline" select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<FONT FACE="symbol" mathcolor="blue">
<xsl:value-of select="$symbol"/>
</FONT>
</xsl:variable>
<xsl:choose>
<xsl:when test="count(child::*)=2">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<xsl:text>-</xsl:text>
</a>
<xsl:apply-templates mode="inline" select="*[2]"/>
<xsl:otherwise>
<xsl:text>(</xsl:text>
<xsl:apply-templates mode="inline" select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<xsl:text>-</xsl:text>
</a>
<xsl:apply-templates mode="inline" select="*[3]"/>
<xsl:variable name="uri">
<xsl:value-of select="m:not/@definitionURL"/>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<FONT FACE="symbol" mathcolor="blue">Ø</FONT>
</a>
<xsl:apply-templates mode="inline" select="*[2]"/>
<xsl:variable name="uri">
<xsl:value-of select="m:exists/@definitionURL"/>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<FONT FACE="symbol" mathcolor="blue">$</FONT>
</a>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<FONT FACE="symbol" mathcolor="blue">
<xsl:value-of select="$symbol"/>
</FONT>
</xsl:variable>
<xsl:choose>
<xsl:when test="count(child::*)=2">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<xsl:text>-</xsl:text>
</a>
<xsl:apply-templates select="*[2]">
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<xsl:text>-</xsl:text>
</a>
<xsl:apply-templates select="*[3]">
<xsl:variable name="uri">
<xsl:value-of select="m:not/@definitionURL"/>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<FONT FACE="symbol" mathcolor="blue">Ø</FONT>
</a>
<xsl:apply-templates select="*[2]"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <FONT FACE="symbol" mathcolor="blue">$</FONT>
+ <a href="{$uri}">
+ <FONT FACE="symbol" mathcolor="blue">$</FONT>
</a>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:text>:</xsl:text>
<xsl:variable name="uri">
<xsl:value-of select="m:limit/@definitionURL"/>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:text>lim</xsl:text>
+ <a href="{$uri}">
+ <xsl:text>lim</xsl:text>
</a>
<SUB>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:variable name="uri">
<xsl:value-of select="m:diff/@definitionURL"/>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <SUP>d</SUP>
+ <a href="{$uri}">
+ <SUP>d</SUP>
<xsl:text>/</xsl:text>
- <SUB>
- <xsl:text>d</xsl:text>
- <xsl:value-of select="m:bvar/m:ci"/>
- </SUB>
+ <SUB>
+ <xsl:text>d</xsl:text>
+ <xsl:value-of select="m:bvar/m:ci"/>
+ </SUB>
</a>
<xsl:apply-templates mode="inline" select="*[3]"/>
</xsl:template>
</xsl:when>
</xsl:choose>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<xsl:value-of select="$symbol"/>
</a>
<xsl:text>{</xsl:text>
</xsl:variable>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:text>lim</xsl:text>
+ <a href="{$uri}">
+ <xsl:text>lim</xsl:text>
</a>
<SUB>
<xsl:apply-templates select="m:bvar/m:ci"/>
<xsl:variable name="uri">
<xsl:value-of select="m:diff/@definitionURL"/>
</xsl:variable>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <SUP>d</SUP>
+ <a href="{$uri}">
+ <SUP>d</SUP>
<xsl:text>/</xsl:text>
- <SUB>
- <xsl:text>d</xsl:text>
- <xsl:value-of select="m:bvar/m:ci"/>
- </SUB>
+ <SUB>
+ <xsl:text>d</xsl:text>
+ <xsl:value-of select="m:bvar/m:ci"/>
+ </SUB>
</a>
<xsl:apply-templates select="*[3]">
<xsl:with-param name="current_indent" select="$current_indent + 5"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$charlength > $framewidth">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:value-of select="$symbol"/>
+ <a href="{$uri}">
+ <xsl:value-of select="$symbol"/>
</a>
<xsl:text>{</xsl:text>
<xsl:apply-templates select="*[2]">
<!-- SET -->
<xsl:template mode="inline" match="m:set">
- <xsl:variable name="uri">
- <xsl:value-of select="concat(string($absPath), @definitionURL)"/>
- </xsl:variable>
+ <xsl:variable name="uri" select="@definitionURL"/>
+<!-- <xsl:value-of select="concat(string($absPath), @definitionURL)"/>
+ </xsl:variable>-->
<xsl:choose>
<xsl:when test="count(child::*) = 0">
<FONT FACE="symbol" mathcolor="blue">Æ</FONT>
</xsl:variable>
<xsl:text>(</xsl:text>
<xsl:apply-templates mode="inline" select="*[2]"/>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
+ <a href="{$uri}">
<FONT FACE="symbol" mathcolor="blue">
<xsl:value-of select="$symbol"/>
</FONT>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
</xsl:call-template>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="url" select="$uri"/>
- </xsl:call-template>
- </xsl:attribute>
- <FONT FACE="symbol" mathcolor="blue">
- <xsl:value-of select="$symbol"/>
- </FONT>
+ <a href="{$uri}">
+ <FONT FACE="symbol" mathcolor="blue">
+ <xsl:value-of select="$symbol"/>
+ </FONT>
</a>
<xsl:apply-templates select="*[3]">
<xsl:with-param name="current_indent" select="$current_indent + 2"/>
<xsl:template match="m:set">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
- <xsl:variable name="uri">
- <xsl:value-of select="concat(string($absPath), @definitionURL)"/>
- </xsl:variable>
+ <xsl:variable name="uri" select="@definitionURL"/>
+<!-- <xsl:value-of select="concat(string($absPath), @definitionURL)"/>
+ </xsl:variable>-->
<xsl:choose>
<xsl:when test="count(child::*) = 0">
<FONT FACE="symbol" mathcolor="blue">Æ</FONT>
--- /dev/null
+<?xml version="1.0"?>
+
+<!-- Copyright (C) 2000, HELM Team -->
+<!-- -->
+<!-- This file is part of HELM, an Hypertextual, Electronic -->
+<!-- Library of Mathematics, developed at the Computer Science -->
+<!-- Department, University of Bologna, Italy. -->
+<!-- -->
+<!-- HELM is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License -->
+<!-- as published by the Free Software Foundation; either version 2 -->
+<!-- of the License, or (at your option) any later version. -->
+<!-- -->
+<!-- HELM is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with HELM; if not, write to the Free Software -->
+<!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
+<!-- MA 02111-1307, USA. -->
+<!-- -->
+<!-- For details, see the HELM World-Wide-Web page, -->
+<!-- http://cs.unibo.it/helm/. -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:m="http://www.w3.org/1998/Math/MathML"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<!--***********************************************************************-->
+<!-- From MathML presentation or HTML to themselves with links -->
+<!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena -->
+<!-- First draft: March 16 2001, Irene Schena -->
+<!--***********************************************************************-->
+
+<xsl:param name="getterURL" select="'http://localhost:8081/'"/>
+<xsl:param name="processorURL" select="'http://localhost:8080/helm/servlet/uwobo/'"/>
+<xsl:param name="keys" select="'C1,HC2'"/>
+<xsl:param name="naturalLanguage" select="'yes'"/>
+<xsl:param name="annotations" select="'no'"/>
+<xsl:param name="media-type" select="'xhtml'"/>
+<xsl:param name="doctype-public" select="'-//W3C//DTD XHTML 1.0 Transitional//EN'"/>
+<xsl:param name="encoding" select="iso-8859-1"/>
+
+<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getxml?uri=</xsl:variable>
+
+<xsl:variable name="header"><xsl:value-of select="$processorURL"/>apply?keys=<xsl:value-of select="$keys"/>&param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&param.annotations=<xsl:value-of select="$annotations"/>&prop.media-type=<xsl:value-of select="$media-type"/>&prop.doctype-public=<xsl:value-of select="$doctype-public"/>&prop.encoding=<xsl:value-of select="$encoding"/>&param.keys=<xsl:value-of select="$keys"/>&param.getterURL=<xsl:value-of select="$getterURL"/>&param.processorURL=<xsl:value-of select="$processorURL"/>&xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
+
+<xsl:template name="makeURL">
+<xsl:param name="uri" select="''"/>
+ <xsl:value-of select="concat(string($header),string($uri),'&param.CICURI=',string($uri))"/>
+</xsl:template>
+
+<xsl:template match="*[@xlink:href]">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="xlink:href">
+ <xsl:call-template name="makeURL">
+ <xsl:with-param name="uri" select="@xlink:href"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="a[@href]">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="makeURL">
+ <xsl:with-param name="uri" select="@href"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match = "/|*">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
</xsl:template>
<xsl:template match="THEOREM|LEMMA|COROLLARY|FACT">
- <h4><xsl:value-of select="name(.)"/><xsl:text> </xsl:text><a href="{$uri}"><xsl:value-of select="@name"/></a></h4>
+ <h4><xsl:value-of select="name(.)"/><xsl:text> </xsl:text><a href="{@uri}"><xsl:value-of select="@name"/></a></h4>
<ENTITY uri="{@uri}" type="1"/>
-</xsl:template>
<xsl:template match="AXIOM|DEFINITION|VARIABLE">
- <h4><xsl:value-of select="name(.)"/><xsl:text> </xsl:text><a href="{$uri}"><xsl:value-of select="@name"/></a></h4>
+ <h4><xsl:value-of select="name(.)"/><xsl:text> </xsl:text><a href="{@uri}"><xsl:value-of select="@name"/></a></h4>
<ENTITY uri="{@uri}" type="0"/>
</xsl:template>