<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:variable name="absPath"><xsl:value-of select="$getterURL"/>getciconly?uri=</xsl:variable>
<!-- HTML Head and Body -->
<!--***********************************************************************-->
-<!-- <xsl:output method="html"/> -->
-<xsl:output method="html" encoding="iso-8859-1"/>
+<!-- <xsl:output method="html" encoding="iso-8859-1"/> -->
+
+<!-- document needs method="xml" and searches locally for the dtd if -->
+<!-- doctype-system is specified (the dtd must exist locally for parsing). -->
+<!-- For having output html must be media-type="html" and for having the -->
+<!-- correct <br /> you must specify at least the remote dtd by means of -->
+<!-- doctype-public -->
+<xsl:output
+ method="xml"
+ encoding="iso-8859-1"
+ media-type="text/html"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
<xsl:variable name="framewidth" select="36"/>
<FONT color="red">From </FONT>
<xsl:apply-templates select="*[2]"/>
<FONT color="red"> we get</FONT>
- <m:mtext>(</m:mtext>
+ (
<xsl:apply-templates select="*[3]"/>
- <m:mtext>) </m:mtext>
+ ) 
<xsl:apply-templates mode="inline" select="*[4]"/>
<FONT color="red"> and </FONT>
- <m:mtext>(</m:mtext>
+ (
<xsl:apply-templates select="*[5]"/>
- <m:mtext>) </m:mtext>
+ ) 
<xsl:apply-templates mode="inline" select="*[6]"/>
- <m:mtext>;</m:mtext>
+ ;
<FONT color="red"> hence </FONT>
<xsl:apply-templates mode="inline" select="*[7]"/>
</xsl:when>
</xsl:when>
<!-- Let -->
<xsl:when test="$name='let'">
- <m:mtext>(</m:mtext>
+ (
<xsl:apply-templates select="m:ci"/>
- <m:mtext>) </m:mtext>
+ )
<xsl:apply-templates select="*[3]">
<xsl:with-param name="current_indent" select="$current_indent + 7"/>
</xsl:apply-templates>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent"/>
</xsl:call-template>
- <m:mtext>(</m:mtext>
+ (
<xsl:apply-templates select="*[3]"/>
- <m:mtext>) </m:mtext>
+ ) 
<xsl:apply-templates select="*[4]">
<xsl:with-param name="current_indent" select="$current_indent + 9"/>
</xsl:apply-templates>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent"/>
</xsl:call-template>
- <m:mtext>(</m:mtext>
+ (
<xsl:apply-templates select="*[5]"/>
- <m:mtext>) </m:mtext>
+ ) 
<xsl:apply-templates select="*[6]">
<xsl:with-param name="current_indent" select="$current_indent + 9"/>
</xsl:apply-templates>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent"/>
</xsl:call-template>
- <m:mtext>*</m:mtext>
+ *
<xsl:apply-templates select="*[4]">
<xsl:with-param name="current_indent" select="$current_indent"/>
</xsl:apply-templates>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent"/>
</xsl:call-template>
- <m:mtext>*</m:mtext>
+ *
<xsl:apply-templates select="*[5]">
<xsl:with-param name="current_indent" select="$current_indent"/>
</xsl:apply-templates>
</xsl:call-template>
<FONT color="red">Let </FONT>
<xsl:apply-templates mode="inline" select="*[3]"/>
- <m:mtext>:</m:mtext>
+ :
<xsl:apply-templates mode="inline" select="*[4]"/>
<FONT color="red"> such that</FONT>
<br/>
<xsl:call-template name="make_indent">
<xsl:with-param name="current_indent" select="$current_indent"/>
</xsl:call-template>
- <m:mtext>(</m:mtext>
+ (
<xsl:apply-templates mode="inline" select="*[5]"/>
- <m:mtext>)</m:mtext>
+ )
<xsl:apply-templates select="*[6]">
<xsl:with-param name="current_indent" select="$current_indent +7"/>
</xsl:apply-templates>
--- /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/. -->
+
+<!--***********************************************************************-->
+<!-- XSLT version 0.1 of theory objects to theory sections: -->
+<!-- First draft: March 08 2001, Irene Schena -->
+<!--***********************************************************************-->
+
+<xsl:stylesheet version="0.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!--******************************************************************-->
+<!-- Parameters containing the absolute path of the CIC file -->
+<!--******************************************************************-->
+<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 -->
+<xsl:param name="keys" select="'C1,C2'"/>
+<xsl:param name="naturalLanguage" select="'yes'"/>
+
+<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getciconly?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.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"
+ encoding="iso-8859-1"
+ media-type="text/html"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="DTD/xhtml1-transitional.dtd" />
+
+
+<!-- Generates an url from an uri -->
+<!-- DUPLICATO in content_to_html!! -->
+
+<xsl:template name="makeURL">
+ <xsl:param name="uri" select="''"/>
+ <xsl:value-of select="concat(string($header),string($uri),'&param.CICURI=',string($uri))"/>
+</xsl:template>
+
+<!-- CONTENT THEORY AND SUBTHEORY -->
+
+<xsl:template match="SECTION">
+ <SECTION>
+ <xsl:apply-templates/>
+ </SECTION>
+</xsl:template>
+
+<!-- THEORY ELEMENTS -->
+<!-- document cannot return HTML, transforming it into XML!!! -->
+
+<xsl:template match="ENTITY">
+<xsl:variable name="url"><xsl:call-template name="makeURL"><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
+<!--<xsl:variable name="doc" select="document(string($url))"/>
+<xsl:value-of select="$doc"/>-->
+ <xsl:copy-of select="document(string($url))"/>
+</xsl:template>
+
+<!-- PRESENTATION THEORY AND SUBTHEORY -->
+
+<xsl:template match = "/|*">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
+
+
+
+
+
+
+
<xsl:stylesheet version="0.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:import href="rootcontent.xsl"/>
-
-<!--******************************************************************-->
-<!-- Variable containing the absolute path of the CIC file -->
-<!--******************************************************************-->
-
-<xsl:param name="getterURL" select="'http://localhost:8081/'"/>
-<xsl:param name="processorURL" select="'http://localhost:8080/helm/servlet/uwobo/'"/>
-
-<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getciconly?uri=</xsl:variable>
-
-<xsl:variable name="header"><xsl:value-of select="$processorURL"/>/apply?key=C1&key=HC2&param.getterURL=<xsl:value-of select="$getterURL"/>&param.processorURL=<xsl:value-of select="$processorURL"/>&xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
<!-- THEORY -->
<!-- THEORY ELEMENTS -->
-<!--
-<xsl:template match="DEFINITION">
- <xsl:copy-of select="document(concat(string($header),string(@definitionURL)))"/>
-</xsl:template>
--->
-
-<xsl:template match="DEFINITION">
-<xsl:param name="current_uri"/>
- <xsl:apply-templates select="document(concat(string($absPath),string($current_uri),"/",string(@uri)))"/>
-</xsl:template>
-
-<xsl:template match="AXIOM">
-<xsl:param name="current_uri"/>
- <xsl:apply-templates select="document(concat(string($absPath),string($current_uri),"/",string(@uri)))"/>
-</xsl:template>
-
-<xsl:template match="THEOREM">
-<xsl:param name="current_uri"/>
- <xsl:apply-templates select="document(concat(string($absPath),string($current_uri),"/",string(@uri)))"/>
-</xsl:template>
-
-<xsl:template match="VARIABLE">
+<xsl:template match="DEFINITION|AXIOM|THEOREM|VARIABLE">
<xsl:param name="current_uri"/>
- <xsl:apply-templates select="document(concat(string($absPath),string($current_uri),"/",string(@uri)))"/>
+<xsl:variable name="uri" select="concat(string($current_uri),"/",string(@uri))"/>
+ <ENTITY uri="{$uri}"/>
</xsl:template>
</xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://www.w3.org/1998/Math/MathML">
-<xsl:import href="annotatedpres.xsl"/>
+<!--<xsl:output method="html" encoding="iso-8859-1"/>-->
+<xsl:output
+ method="xml"
+ encoding="iso-8859-1"
+ media-type="text/html"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="DTD/xhtml1-transitional.dtd" />
<xsl:template match="SECTION">
<xsl:param name="subsect" select="0"/>
<html>
<head></head>
<body>
- <m:math><m:mtext>BEGIN SECTION</m:mtext></m:math>
+ <h3>BEGIN SECTION</h3>
<xsl:apply-templates select="*"><xsl:with-param name="subsect" select="1"/></xsl:apply-templates>
- <m:math><m:mtext>END SECTION</m:mtext></m:math>
+ <h3>END SECTION</h3>
</body>
</html>
</xsl:when>
<xsl:otherwise>
- <m:math><m:mtext>BEGIN SECTION</m:mtext></m:math>
+ <h3>BEGIN SECTION</h3>
<xsl:apply-templates select="*"><xsl:with-param name="subsect" select="1"/></xsl:apply-templates>
- <m:math><m:mtext>END SECTION</m:mtext></m:math>
+ <h3>END SECTION</h3>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+<xsl:template match="ENTITY">
+ <ENTITY uri="{@uri}"/>
+</xsl:template>
+
</xsl:stylesheet>
+
+
+
+
+
+