]> matita.cs.unibo.it Git - helm.git/commitdiff
Stylesheets for (cic|content|presentation) theory now fully working
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 4 May 2001 10:46:20 +0000 (10:46 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 4 May 2001 10:46:20 +0000 (10:46 +0000)
helm/on-line/javascript/control.js
helm/style/links_library.xsl

index 4389be7d884b3180e418e3ab9cbceddb534df931..76dc7b768f450a43511e024b0147f32aab4c6d68 100644 (file)
@@ -148,21 +148,39 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.keys=" + escape("C1,HC2,L") +
        "&param.interfaceURL=" + escape(interfaceURL);
     } else if (format == "html" && type == "theory") {
-      keys = escape("T1,T2,L,E")+"&param.processorURL=" + escape(processorURL) +
+      keys = escape("T1,T2,L,E")+
+       "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
-       "&param.thkeys=" + escape("TC1,HC2,L") +
+       "&param.keys=" + escape("C1,HC2,L") +
+       "&param.thkeys=" + escape("T1,T2,L,E") +
+       "&param.embedkeys=" + escape("TC1,HC2,L") +
        "&param.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&param.encoding=iso-8859-1" +
+       "&param.thencoding=iso-8859-1" +
        "&param.media-type=text/html" +
-       "&param.keys=" + escape("C1,HC2,L") +
+       "&param.thmedia-type=text/html" +
        "&param.interfaceURL=" + escape(interfaceURL) +
        "&param.thinterfaceURL=" + escape(thinterfaceURL);
     } else if (format == "mml_cont" && type == "cic") {
       keys = "C1";
     } else if (format == "mml_cont" && type == "theory") {
-      keys = escape("T1,E")+"&param.keys=C1&param.thkeys=TC1";
+      keys = escape("T1,L,E")+
+       "&param.keys=C1" +
+       "&param.thkeys=T1,L,E" +
+       "&param.embedkeys=TC1" +
+
+       "&param.processorURL=" + escape(processorURL) +
+       "&param.getterURL=" + escape(getterURL) +
+       "&param.doctype-public=" +
+       "&param.encoding=" +
+       "&param.thencoding=iso-8859-1" +
+       "&param.media-type=text/xml" +
+       "&param.thmedia-type=text/html" +
+       "&param.interfaceURL=" + escape(interfaceURL) +
+       "&param.thinterfaceURL=" + escape(thinterfaceURL);
     } else if (format == "mml_pres" && type == "cic") {
-      keys = escape("C1,C2,L")+"&param.processorURL=" + escape(processorURL) +
+      keys = escape("C1,C2,L")+
+       "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
        "&prop.doctype-public="+
        "&prop.encoding=" +
@@ -173,12 +191,17 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.keys=" + escape("C1,C2,L") +
        "&param.interfaceURL=" + escape(interfaceURL);
     } else if (format == "mml_pres" && type == "theory") {
-      keys = escape("T1,T2,L,E")+"&param.keys=C1,C2,L&param.thkeys=TC1,C2,L" +
+      keys = escape("T1,T2,L,E")+
+       "&param.keys=C1,C2,L" +
+       "&param.thkeys=T1,T2,L,E" +
+       "&param.embedkeys=TC1,C2,L" +
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
        "&param.doctype-public=" +
        "&param.encoding=" +
+       "&param.thencoding=iso-8859-1" +
        "&param.media-type=text/xml" +
+       "&param.thmedia-type=text/html" +
        "&param.interfaceURL=" + escape(interfaceURL) +
        "&param.thinterfaceURL=" + escape(thinterfaceURL);
     }
index 8f18a4882eafc2bf71a9665e5182df431ab4c7ee..d24c63f453fd1c173e808e2f774a1d7ab3b94273 100644 (file)
 <!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena                      -->
 <!--***********************************************************************--> 
 
+<!--      * is used for objects                      -->
+<!--    th* is used for theories                     -->
+<!-- embed* is used for objects embedded in theories -->
+
 <xsl:param name="getterURL" select="'http://localhost:8081/'"/>
 <xsl:param name="processorURL" select="'http://localhost:8080/helm/servlet/uwobo/'"/>
+<!-- URL to the frameset (control + output) -->
 <xsl:param name="interfaceURL" select="''"/>
 <xsl:param name="thinterfaceURL" select="''"/>
-<!-- Keys contains the keys of the stylesheets to be applied following links-->
+
 <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,HC2,L'"/>
+<xsl:param name="embedkeys" select="'TC1,HC2,L'"/>
+<xsl:param name="thkeys" select="'T1,T2,L,E'"/>
+
 <xsl:param name="naturalLanguage" select="'yes'"/>
 <xsl:param name="annotations" select="'no'"/>
+
 <xsl:param name="media-type" select="'text/html'"/>
+<xsl:param name="thmedia-type" select="'text/html'"/>
 <xsl:param name="doctype-public" select="'-//W3C//DTD XHTML 1.0 Transitional//EN'"/>
 <xsl:param name="encoding" select="'iso-8859-1'"/>
+<xsl:param name="thencoding" select="'iso-8859-1'"/>
+
 
 <xsl:template name="quote">
  <xsl:param name="s" select="''"/>
@@ -140,13 +149,13 @@ step for expanding objects -->
 
 <xsl:variable name="quotedthkeys">
  <xsl:call-template name="quote">
-  <xsl:with-param name="s" select="'T1,T2,L,E'"/>
+  <xsl:with-param name="s" select="$thkeys"/>
  </xsl:call-template>
 </xsl:variable>
 
-<xsl:variable name="quotedekeys">
+<xsl:variable name="quotedembedkeys">
  <xsl:call-template name="quote">
-  <xsl:with-param name="s" select="$thkeys"/>
+  <xsl:with-param name="s" select="$embedkeys"/>
  </xsl:call-template>
 </xsl:variable>
 
@@ -168,11 +177,18 @@ step for expanding objects -->
  </xsl:call-template>
 </xsl:variable>
 
+<xsl:variable name="quotedquotedembedkeys">
+ <xsl:call-template name="quote">
+  <xsl:with-param name="s" select="$quotedembedkeys"/>
+ </xsl:call-template>
+</xsl:variable>
+
 <xsl:variable name="header0"><xsl:value-of select="$interfaceURL"/>?url=</xsl:variable>
 <xsl:variable name="thheader0"><xsl:value-of select="$thinterfaceURL"/>?url=</xsl:variable>
 <xsl:variable name="header1"><xsl:value-of select="$escaped-processorURL"/>apply?keys=</xsl:variable>
-<xsl:variable name="header2">&#x26;param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&#x26;param.annotations=<xsl:value-of select="$annotations"/>&#x26;prop.media-type=<xsl:value-of select="$media-type"/>&#x26;param.media-type=<xsl:value-of select="$media-type"/>&#x26;prop.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;prop.encoding=<xsl:value-of select="$encoding"/>&#x26;param.encoding=<xsl:value-of select="$encoding"/>&#x26;param.keys=<xsl:value-of select="$quotedkeys"/>&#x26;param.getterURL=<xsl:value-of select="$escaped-getterURL"/>&#x26;param.processorURL=<xsl:value-of select="$escaped-processorURL"/>&#x26;param.interfaceURL=<xsl:value-of select="$escaped-interfaceURL"/>&#x26;xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
-<xsl:variable name="header3">&#x26;param.thkeys=<xsl:value-of select="$quotedekeys"/>&#x26;param.thinterfaceURL=<xsl:value-of select="$escaped-thinterfaceURL"/></xsl:variable>
+<xsl:variable name="bothheader2">&#x26;param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&#x26;param.annotations=<xsl:value-of select="$annotations"/>&#x26;prop.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.encoding=<xsl:value-of select="$encoding"/>&#x26;param.media-type=<xsl:value-of select="$media-type"/>&#x26;param.keys=<xsl:value-of select="$quotedkeys"/>&#x26;param.getterURL=<xsl:value-of select="$escaped-getterURL"/>&#x26;param.processorURL=<xsl:value-of select="$escaped-processorURL"/>&#x26;param.interfaceURL=<xsl:value-of select="$escaped-interfaceURL"/>&#x26;xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
+<xsl:variable name="header2">&#x26;prop.media-type=<xsl:value-of select="$media-type"/>&#x26;prop.encoding=<xsl:value-of select="$encoding"/></xsl:variable>
+<xsl:variable name="thheader2">&#x26;prop.media-type=<xsl:value-of select="$thmedia-type"/>&#x26;param.thmedia-type=<xsl:value-of select="$thmedia-type"/>&#x26;param.thkeys=<xsl:value-of select="$quotedthkeys"/>&#x26;param.embedkeys=<xsl:value-of select="$quotedembedkeys"/>&#x26;param.thinterfaceURL=<xsl:value-of select="$escaped-thinterfaceURL"/>&#x26;param.thencoding=<xsl:value-of select="$thencoding"/>&#x26;prop.encoding=<xsl:value-of select="$thencoding"/></xsl:variable>
 
 <xsl:variable name="quotedheader1">
  <xsl:call-template name="quote">
@@ -180,15 +196,21 @@ step for expanding objects -->
  </xsl:call-template>
 </xsl:variable>
 
+<xsl:variable name="quotedbothheader2">
+ <xsl:call-template name="quote">
+  <xsl:with-param name="s" select="$bothheader2"/>
+ </xsl:call-template>
+</xsl:variable>
+
 <xsl:variable name="quotedheader2">
  <xsl:call-template name="quote">
   <xsl:with-param name="s" select="$header2"/>
  </xsl:call-template>
 </xsl:variable>
 
-<xsl:variable name="quotedheader3">
+<xsl:variable name="quotedthheader2">
  <xsl:call-template name="quote">
-  <xsl:with-param name="s" select="$header3"/>
+  <xsl:with-param name="s" select="$thheader2"/>
  </xsl:call-template>
 </xsl:variable>
 
@@ -200,18 +222,21 @@ step for expanding objects -->
  <xsl:value-of select="$quotedheader1"/>
  <xsl:value-of select="$quotedquotedkeys"/>
  <xsl:value-of select="$quotedheader2"/>
+ <xsl:value-of select="$quotedbothheader2"/>
 </xsl:variable>
 
 <xsl:variable name="biquotedthfixedheader">
  <xsl:value-of select="$thheader0"/>
  <xsl:value-of select="$quotedheader1"/>
  <xsl:value-of select="$quotedquotedthkeys"/>
- <xsl:value-of select="$quotedheader2"/>
+ <xsl:value-of select="$quotedthheader2"/>
+ <xsl:value-of select="$quotedbothheader2"/>
 </xsl:variable>
 
-<!-- NOTE: thkeys are propagated, but we are sure (for now!!!) that -->
-<!-- they won't never be used.                                      -->
-<!-- type, instead, is not propagated                               -->
+<!-- NOTE: embedkeys and thkeys are propagated, but we are sure that -->
+<!-- they won't never be used.                                       -->
+<!--CSC: fixare il punto sopra!!! -->
+<!-- type, instead, is not propagated                                -->
 <xsl:template name="makeURL">
 <xsl:param name="uri" select="''"/>
      <xsl:value-of select="$biquotedfixedheader"/>
@@ -221,7 +246,6 @@ step for expanding objects -->
 <xsl:param name="uri" select="''"/>
      <xsl:value-of select="$biquotedthfixedheader"/>
      <xsl:value-of select="$uri"/>%26param.CICURI%3D<xsl:value-of select="$uri"/>
-     <xsl:value-of select="$quotedheader3"/>
 </xsl:template>
 
 <!-- makeURL4embedding() maps URIs into URLs              -->
@@ -231,12 +255,10 @@ step for expanding objects -->
 <xsl:param name="uri" select="''"/>
 <xsl:param name="type" select="0"/>
  <xsl:value-of select="$header1"/>
- <xsl:value-of select="$quotedekeys"/>
+ <xsl:value-of select="$quotedembedkeys"/>
  <xsl:value-of select="$header2"/>
+ <xsl:value-of select="$bothheader2"/>
  <xsl:value-of select="$uri"/>&#x26;param.CICURI=<xsl:value-of select="$uri"/>&#x26;param.type=<xsl:value-of select="$type"/>
 </xsl:template>
 
 </xsl:stylesheet> 
-
-
-