<!--******************************************************************-->
<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 -->
+<!-- Keys contains the keys of the stylesheets to be applied following links-->
<xsl:param name="keys" select="'C1,C2'"/>
+<!-- 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="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: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:output
method="xml"
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:param name="type" select="0"/>
+<xsl:param name="uri" select="''"/>
+ <xsl:value-of select="concat(string($header),string($uri),'&param.CICURI=',string($uri),'&param.type=',string($type))"/>
</xsl:template>
-<!-- CONTENT THEORY AND SUBTHEORY -->
+<!-- THEORY CONTENT ELEMENTS -->
+<!-- document cannot return HTML, transforming it into XML!!! -->
-<xsl:template match="SECTION">
- <SECTION>
- <xsl:apply-templates/>
- </SECTION>
+<xsl:template match="THEOREM|LEMMA|COROLLARY|FACT">
+<xsl:variable name="url"><xsl:call-template name="makeURL"><xsl:with-param name="type" select="1"/><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+<!--<xsl:variable name="doc" select="document(string($url))"/>
+<xsl:value-of select="$doc"/>-->
+ <xsl:copy-of select="document(string($url))"/>
+ </xsl:copy>
</xsl:template>
-<!-- THEORY ELEMENTS -->
-<!-- document cannot return HTML, transforming it into XML!!! -->
+<xsl:template match="AXIOM|DEFINITION|VARIABLE">
+<xsl:variable name="url"><xsl:call-template name="makeURL"><xsl:with-param name="type" select="0"/><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:copy-of select="document(string($url))"/>
+ </xsl:copy>
+</xsl:template>
+
+<!-- THEORY PRESENTATION ELEMENTS -->
<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:variable name="url"><xsl:call-template name="makeURL"><xsl:with-param name="type" select="@type"/><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
<xsl:copy-of select="document(string($url))"/>
</xsl:template>
-<!-- PRESENTATION THEORY AND SUBTHEORY -->
+<!-- CONTENT AND PRESENTATION THEORY AND SUBTHEORY -->
<xsl:template match = "/|*">
<xsl:copy>
-
-
-
-