]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/expandobj.xsl
Now uses the new stylesheets waterfall
[helm.git] / helm / style / expandobj.xsl
index d380be3ed63abb689ee61f2b3ef0118dcfdc766b..081c225ce99b45743c64afdf8989ff30cac4e328 100644 (file)
 <!--******************************************************************-->
 <!-- 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"/>&#x26;param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&#x26;param.keys=<xsl:value-of select="$keys"/>&#x26;param.getterURL=<xsl:value-of select="$getterURL"/>&#x26;param.processorURL=<xsl:value-of select="$processorURL"/>&#x26;xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
+<xsl:import href="links_library.xsl"/>
 
 <xsl:output 
        method="xml"
        doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
        doctype-system="DTD/xhtml1-transitional.dtd" />
 
+<!-- THEORY CONTENT ELEMENTS -->
+<!-- document cannot return HTML, transforming it into XML!!! -->
 
-<!-- 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),'&#x26;param.CICURI=',string($uri))"/>
+<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:with-param name="theory" select="'yes'"/></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>
 
-<!-- CONTENT THEORY AND SUBTHEORY -->
-
-<xsl:template match="SECTION">
-    <SECTION>
-     <xsl:apply-templates/>
-    </SECTION>
+<xsl:template match="AXIOM|DEFINITION|VARIABLE">
+<xsl:param name="type" select="0"/><xsl:variable name="url"><xsl:call-template name="makeURL"><xsl:with-param name="type" select="0"/><xsl:with-param name="uri" select="@uri"/><xsl:with-param name="theory" select="'yes'"/></xsl:call-template></xsl:variable>
+   <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:copy-of select="document(string($url))"/>
+   </xsl:copy>
 </xsl:template>
 
-<!-- THEORY ELEMENTS -->
-<!-- document cannot return HTML, transforming it into XML!!! -->
+<!-- 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:with-param name="theory" select="'yes'"/></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>
 </xsl:template>
 
 </xsl:stylesheet>
-
-
-
-
-
-
-