]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/content_to_html.xsl
Now uses the new stylesheets waterfall
[helm.git] / helm / style / content_to_html.xsl
index cd17b6d4cd45f7c74b243de257ffac390b81cee8..9de7d48962cfe82ab3522e65dfd56f9db15cd66b 100644 (file)
 <!-- 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: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.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:include href="html_init.xsl"/>
 <xsl:include href="html_set.xsl"/>
 <xsl:include href="html_reals.xsl"/>
 
 <xsl:variable name="showcast" select="0"/>
 
-
 <!--***********************************************************************-->
 <!-- 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"/>
 
 <xsl:template mode="inline" match="m:ci">
  <xsl:choose>
   <xsl:when test="boolean(@definitionURL)">
-   <a>
-   <xsl:attribute name="href">
-    <xsl:value-of select="concat(string($header),string(@definitionURL))"/>
-   </xsl:attribute>
+   <a href="{@definitionURL}">
    <xsl:apply-templates/>
    </a>
   </xsl:when>
      <FONT color="red">From&#x00a0;</FONT>
      <xsl:apply-templates select="*[2]"/>
      <FONT color="red">&#x00a0;we get</FONT>
-     <m:mtext>(</m:mtext>
+     (
      <xsl:apply-templates select="*[3]"/>
-     <m:mtext>)&#x00a0;</m:mtext>
+     )&#x00a0;
      <xsl:apply-templates mode="inline" select="*[4]"/>
      <FONT color="red">&#x00a0;and&#x00a0;</FONT>
-     <m:mtext>(</m:mtext>
+     (
      <xsl:apply-templates select="*[5]"/>
-     <m:mtext>)&#x00a0;</m:mtext>
+     )&#x00a0;
      <xsl:apply-templates mode="inline" select="*[6]"/>
-     <m:mtext>;</m:mtext>
+     ;
      <FONT color="red">&#x00a0;hence&#x00a0;</FONT>
      <xsl:apply-templates mode="inline" select="*[7]"/>
     </xsl:when>
          <xsl:text>:</xsl:text>
          <xsl:apply-templates select="m:bvar/m:type">
           <xsl:with-param name="current_indent" 
-           select="$current_indent + 2 + string-length(m:bvar/m:ci)"/>
+           select="$current_indent + 5 + 2*string-length(m:bvar/m:ci)"/>
          </xsl:apply-templates>
          <br/>
          <xsl:call-template name="make_indent">
          <xsl:text>:</xsl:text>
          <xsl:apply-templates select="m:bvar/m:type">
           <xsl:with-param name="current_indent" 
-           select="$current_indent + 2 + string-length(m:bvar/m:ci)"/>
+           select="$current_indent + 5 + 2*string-length(m:bvar/m:ci)"/>
          </xsl:apply-templates><br/> 
          <xsl:call-template name="make_indent">
           <xsl:with-param name="current_indent" select="$current_indent + 2"/> 
       </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>)&#x00a0;</m:mtext>
+       )&#x00a0;
        <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>)&#x00a0;</m:mtext>
+       )&#x00a0;
        <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&#x00a0;</FONT>
        <xsl:apply-templates mode="inline" select="*[3]"/>
-       <m:mtext>:</m:mtext>
+       :
        <xsl:apply-templates mode="inline" select="*[4]"/>
        <FONT color="red">&#x00a0;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>
        <xsl:text>:</xsl:text>
        <xsl:apply-templates select="m:bvar/m:type">
         <xsl:with-param name="current_indent" 
-           select="$current_indent + 2 + string-length(m:bvar/m:ci)"/>
+           select="$current_indent + 4 + 2*string-length(m:bvar/m:ci)"/>
        </xsl:apply-templates><br/>
        <xsl:call-template name="make_indent">
         <xsl:with-param name="current_indent" select="$current_indent + 2"/>       
 <xsl:template match="m:ci">
  <xsl:choose>
   <xsl:when test="boolean(@definitionURL)">
-   <a>
-   <xsl:attribute name="href">
-    <xsl:value-of select="concat(string($header),string(@definitionURL))"/>
-   </xsl:attribute>
+   <a href="{@definitionURL}">
    <xsl:apply-templates/>
    </a>
   </xsl:when>
@@ -1003,10 +998,10 @@ PROOF:
          <xsl:text>| </xsl:text>
          </xsl:otherwise>
          </xsl:choose>
-         <xsl:value-of select="./@name"/> 
+         <xsl:value-of select="./@name"/>
          <xsl:text>: </xsl:text>
          <xsl:apply-templates select="./*[1]">
-          <xsl:with-param name="current_indent" select="$current_indent + string-length(./@name) + 4"/>
+          <xsl:with-param name="current_indent" select="$current_indent + 2*string-length(./@name) + 5"/>
          </xsl:apply-templates>
       </xsl:for-each>
      </xsl:for-each>