]> matita.cs.unibo.it Git - helm.git/commitdiff
###############################################################
authorLuca Padovani <luca.padovani@unito.it>
Tue, 25 May 2004 17:56:07 +0000 (17:56 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Tue, 25 May 2004 17:56:07 +0000 (17:56 +0000)
### Partial major upgrade of the HELM/MoWGLI Web interface. ###
###############################################################

WARNING: requires the new UWOBO profiles.

Known bugs:

 1. the JSMmenu for graphs is broken
 2. the configuration stuff is utterly broken: you should rely on
    the default configuration
 3. only HTML has been tested (MathML and ProofTrees are broken for
    sure)
 4. dead code everywhere (e.g. almost all the existent
    javascript code; several tokens in links_library.xsl)

16 files changed:
helm/graphs/tools/mk_html.pl
helm/on-line/html/cic/control.html
helm/on-line/html/cic/index.html
helm/on-line/html/library/control.html
helm/on-line/html/library/index.html
helm/on-line/html/theory/control.html
helm/on-line/html/theory/index.html
helm/on-line/javascript/control.js
helm/on-line/xslt/ls2html.xsl
helm/on-line/xslt/ls2theory.xsl [new file with mode: 0644]
helm/on-line/xslt/makeGraphLinks.xsl
helm/on-line/xslt/metadataLib.xsl
helm/on-line/xslt/resolve_topurl.xsl
helm/on-line/xslt/toplevel_header.xsl [new file with mode: 0644]
helm/on-line/xslt/xslt_index.txt
helm/searchEngine/html/index.html

index 6ca4d0bcf3caa819d58eaa87bc3424726e353f50..a928cd5ade5c4cfafdf79afb79f71e90a20838ad 100755 (executable)
@@ -4,16 +4,14 @@ use URI::Escape;
 
 print <<EOT;
 <?xml version="1.0"?>
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:subst="http://www.cs.unibo.it/helm/subst">
  <head>
   <title>Graph</title>
  </head>
  <body bgcolor="white" onLoad="window.focus()">
   <script>
+   var draw_graphURL = "<subst:draw_graphURL/>";
 <![CDATA[
-   // NOTE: getParam will be defined during the application
-   // of the next stylesheet in the stylesheet chain
-   var draw_graphURL = unescape(getParam("param.draw_graphURL"));
    document.write('<img border="false" src="' + draw_graphURL + 'get_gif?pid=$ARGV[0]" usemap="#graphe">');
 ]]>
   </script>
index 1697419970723bb5a6f096e0a40c8ca0b553cc5a..be00b755ccb35aa8b24027e246fdfb240a6cad35 100644 (file)
@@ -1,7 +1,8 @@
-<html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+"http://www.w3.org/TR/REC-html40/loose.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:subst="http://www.cs.unibo.it/helm/subst">
 
 <head>
-<title>???</title>
 
 <style type="text/css">
 #normal { background-color: #e6e6fa; font-family: sans-serif }
@@ -9,86 +10,62 @@ td.head { font-weight: bold; background-color: #e6e6fa; color: brown }
 td.back { background-color: #e6e6fa; color: brown }
 #indent { margin-left: 1cm; margin-right: 1cm }
 #centered { text-align: center }
+h2     { text-align: center }
+li     { padding-bottom: 1ex }
 </style>
 
-<script language="JavaScript" src="../../javascript/defaults.js"></script>
-<script language="JavaScript" src="../../javascript/utils.js"></script>
-<script language="JavaScript" src="../../javascript/control.js"></script>
-
+<script>
+ var CICURI="<subst:CICURI/>";
+ var annotations="<subst:annotations/>";
+</script>
 </head>
 
 <body id="normal">
- <h1>Object: 
-  &quot;<script>document.write(extractParam(unescape(getParam('url')),'param.CICURI'))</script>&quot;
- &nbsp;&nbsp;&nbsp;<font size="+1">[Annotations are
- <script>if ((extractParam(unescape(getParam('url')),'param.annotations')) == 'no') document.write('off'); else document.write('on')</script>
- ]</font>
- </h1>
- <table>
-  <tr>
-   <td>
+  <h2><subst:base_CICURI/></h2>
+<!--
+  [Annotations are <script>if (annotations) == 'no') document.write('off'); else document.write('on')</script>]
+-->
+<ul>
+<!--
+  <li>
     <script>
-     var url = unescape(getParam('url'));
-     document.write('<a href="' + url + '" target="_blank">Object URL</a>');
+     var url = "<subst:url/>";
+     document.write('<a href="' + url + '" target="_blank">Open object in new window</a>');
      </script>
-   </td>
-   <td>
-    Follow the link to view the displayed object alone (without this control frame)
-   </td>
-  </tr>
-  <tr>
-   <td>
+  </li>
+-->
+  <li>
     <script>
-     var url = unescape(getParam('url'));
-     url = setParam(url,"keys",getCICMathMLKeys());
-     url = setParam(url,"prop.doctype-public","");
-     url = setParam(url,"prop.encoding","");
-     url = setParam(url,"prop.media-type","application/x-helm-annotation-helper");
-     url = url + "&param.explodeall=true";
-     document.write(
-      '<a target="result" href="' + url + '">Annotate it</a>'
-     )
-    </script>
-   </td>
-   <td>
-    (Before following the link, you must install the HELM Annotation Helper)
-   </td>
-  </tr>
-  <tr>
-   <td>
+     var url = "<subst:url/>";
+     document.write('<a href="' + url + '&amp;param.toplevel=true" target="result">Object</a>');
+     </script>
+  </li>
+  <li>
     <script>
-     var url = unescape(getParam('url'));
-     var getterURL = extractParam(url,'param.getterURL');
-     var CICURI = dropBodySuffix(extractParam(url,'param.CICURI'));
-     url = setParam(url,"keys","MC%2CRT");
-     url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D" + CICURI);
-     url = setParam(url,"prop.media-type","text/html");
-     url = setParam(url,"prop.encoding","iso-8859-1");
-     url = setParam(url,"param.CICURI",CICURI);
+     var processorURL = "<subst:processorURL/>";
+     var getterURL = "<subst:getterURL/>";
+     var CICURI = "<subst:CICURI/>";
+     var profile = "<subst:profile/>";
+     var url = processorURL + "apply?keys=MC%2CRT&amp;xmluri=" +
+         getterURL + "getxml%3Furi%3D" + CICURI +
+         "&amp;prop.media-type=text/html&amp;prop.encoding=iso-8859-1" +
+         "&amp;param.CICURI=" + CICURI + "&amp;param.profile=" + profile +
+         "&amp;profile=" + profile;
      document.write(
-      '<a target="_blank" href="' + url + '">View its metadata and dependencies</a>'
+      '<a target="result" href="' + url + '">Metadata and dependencies</a>'
      );
     </script>
-   </td>
-   <td>DC Metadata and dependency metadata; Dependency graphs
-   </td>
-  </tr>
-  <tr>
-   <td>
+  </li>
+  <li>
     <script>
-     var url = unescape(getParam('url'));
-     var proofcheckerURL = unescape(extractParam(url,'param.proofcheckerURL'));
-     var CICURI = dropBodySuffix(extractParam(url,'param.CICURI'));
+     var proofcheckerURL = "<subst:proofcheckerURL/>";
+     var cicURI = "<subst:cicURI/>";
      url = proofcheckerURL + "proofCheck?uri=" + CICURI;
      document.write(
-      '<a target="_blank" href="' + url + '">Proof-check it</a>'
+      '<a target="result" href="' + url + '">Proof-check it</a>'
      );
     </script>
-   </td>
-   <td>Proof-checking is recursively performed over the untrusted parts of the
-       library
-   </td>
-  </tr>
- </table>
+  </li>
+</ul>
 </body>
 </html>
index c2a2ef50463a0224fefeaee74b5e022b340a4690..1d9bd88c72936b57625246d48348694f7d124de8 100644 (file)
@@ -1,16 +1,24 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
 "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:subst="http://www.cs.unibo.it/helm/subst">
 <head>
- <script language="JavaScript" src="../../javascript/defaults.js"></script>
- <script language="JavaScript" src="../../javascript/utils.js"></script>
- <title>???</script></title>
+ <title><subst:CICURI/></title>
 </head>
 <script>
-  document.write('<frameset onLoad="window.focus()" rows="18%,*" border="0" scrolling="no">');
-  document.write('<frame src="control.html?url=' + getParam('url') +'"/>');
-  document.write('<frame src="' + unescape(getParam('url')) + '" + name="result"/>');
+ var processorURL = "<subst:processorURL/>";
+ var interfaceURL = "<subst:interfaceURL/>";
+ var profile = "<subst:profile/>";
+ var CICURI = "<subst:CICURI/>";
+ var annotations = "<subst:annotations/>";
+ var url = "<subst:makeURL/>";
+<![CDATA[
+  document.write('<frameset cols="18%,*" border="1">');
+  document.write('<frame src="' + processorURL + 'apply?keys=RT&profile=' +
+    profile + '&param.profile=' + profile + '&param.annotations=' + annotations +
+    '&param.CICURI=' + CICURI + '&param.url=' + escape(url) + '&xmluri=' +
+    escape(interfaceURL + 'html/cic/control.html') +'"/>');
+  document.write('<frame src="' + url + '&param.toplevel=true" name="result"/>');
   document.write('</frameset>');
+]]>
 </script>
-
 </html>
index 72c13b65f63bc4ab03de914953b392b58e830eee..50016dcea48208e5654cbcd8dd9c97f724b282d0 100644 (file)
     </td>
     <td>
      <script>
+      var processorURL = '<subst:processorURL/>';
+      var interfaceURL = '<subst:interfaceURL/>';
+      var profile = '<subst:profile/>';
 <![CDATA[
-       document.write('<a target="_top" href="' +
-         getParam2('topurl') + '/html/library/index.html' +
-        '" onClick="refreshReload()">Reload</a>');
+       document.write('<a target="_top" href="" ' +
+        'onClick="refreshReload(profile,processorURL,interfaceURL)">Reload</a>');
 ]]>
      </script>
      <br />
      (do it also before attempting to take a link to the current page)
      <script>
 <![CDATA[
-       top.processorURL = getParam2('processorURL');
-       top.getterURL = getParam2('getterURL');
-       top.proofcheckerURL = getParam2('proofcheckerURL');
-       top.draw_graphURL = getParam2('draw_graphURL');
-       top.uri_set_queueURL = getParam2('uri_set_queueURL');
-       top.UNICODEvsSYMBOL = getParam2('UNICODEvsSYMBOL');
-       top.topurl = getParam2('topurl');
        top.mode = getParam2('mode');
        top.cicuri = getParam2('cicuri');
        top.theoryuri = getParam2('theoryuri');
@@ -98,7 +93,7 @@
      <script>
 <![CDATA[
        document.write('<a target="_top" href=""' +
-        ' onClick="refreshReload()">Configuration Panel</a>');
+        ' onClick="refreshReload(profile,processorURL,interfaceURL)">Configuration Panel</a>');
 ]]>
      </script>
      <br />
index 4f1be5faac96722d62bd4e524ea6e528284a63e0..a667aba28e000bec2b9f8ae7283665fadbd2000f 100644 (file)
 <title>Index</title>
 </head>
 <script>
-  var topurl = "<subst:topurl/>";
+  var topurl = "<subst:interfaceURL/>";
+  var getterURL = "<subst:getterURL/>";
+  var processorURL = "<subst:processorURL/>";
+  var profile = "<subst:profile/>";
 <![CDATA[
   document.write('<frameset rows="18%,*" border="0" scrolling="no">');
   var control_frame_URL=
        '?topurl=' + topurl +
        '&mode=' + getParam2('mode') +
        '&cicuri=' + getParam2('cicuri') +
-       '&theoryuri=' + getParam2('theoryuri') +
-       '&processorURL=' + getParam2('processorURL') +
-       '&getterURL=' + getParam2('getterURL') +
-       '&proofcheckerURL=' + getParam2('proofcheckerURL') +
-       '&draw_graphURL=' + getParam2('draw_graphURL') +
-       '&uri_set_queueURL=' + getParam2('uri_set_queueURL') +
-       '&UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL');
+       '&theoryuri=' + getParam2('theoryuri');
   var escaped_control_frame_URL = escape(control_frame_URL);
   document.write('<frame src="' +
-        getParam2('processorURL') + 'apply' +
+        processorURL + 'apply' +
        '?keys=RT' +
+       '&profile=' + profile +
+       '&param.profile=' + profile +
         '&param.topurl=' + topurl +
         '&xmluri=' + escaped_control_frame_URL + '" name="control"/>');
   document.write('<frameset cols="50%,50%" border="0" scrolling="no">');
   document.write('<frameset rows="11%,*" border="0" scrolling="no">');
   document.write('<frame src="' +
-       getParam2('processorURL') + 'apply' +
+       processorURL + 'apply' +
        '?keys=GP' +
-       //'&xmluri=' + location.protocol + "//" + location.host + chopSlash(location.pathname) + "/header.html" +
+       '&profile=' + profile +
+       '&param.profile=' + profile +
        '&xmluri=' + topurl + '/html/library/header.html' +
        '&param.uri=' + getParam2('theoryuri') + 
        '" name="theoryheader"/>');
   document.write('<frame src="' +
-       getParam2('processorURL') + 'apply' +
+       processorURL + 'apply' +
        '?keys=L2H' +
-       '&xmluri=' + escape(getParam2('getterURL') + 'ls?format=xml&baseuri=' + getParam2('theoryuri')) +
+       '&profile=' + profile +
+       '&param.profile=' + profile +
+       '&xmluri=' + escape(getterURL + 'ls?format=xml&baseuri=' + getParam2('theoryuri')) +
         '&param.keys=L2H' +
        '&param.uri=' + getParam2('theoryuri') +
-       '&param.getterURL=' + getParam2('getterURL') +
-       '&param.proofcheckerURL=' + getParam2('proofcheckerURL') +
-       '&param.draw_graphURL=' + getParam2('draw_graphURL') +
-       '&param.uri_set_queueURL='+getParam2('uri_set_queueURL') +
-       '&param.UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL') +
         '&param.target=theory' +
-       //'&param.interfaceURL=' + location.protocol + "//" + location.host + chopSlash(chopSlash(chopSlash(location.pathname))) + 
-       '&param.interfaceURL=' + topurl +
        '" name="theoryresult"/>');
   document.write('</frameset>');
   document.write('<frameset rows="11%,*" border="0" scrolling="no">');
   document.write('<frame src="' +
-       getParam2('processorURL') + 'apply' +
+       processorURL + 'apply' +
        '?keys=GP' +
-       //'&xmluri=' + location.protocol + "//" + location.host + chopSlash(location.pathname) + "/header.html" +
+       '&profile=' + profile +
+       '&param.profile=' + profile +
        '&xmluri=' + topurl + '/html/library/header.html' +
        '&param.uri=' + getParam2('cicuri') + 
        '" name="cicheader"/>');
   document.write('<frame src="' +
-       getParam2('processorURL') + 'apply' +
+       processorURL + 'apply' +
        '?keys=L2H' +
-       '&xmluri=' + escape(getParam2('getterURL') + 'ls?format=xml&baseuri=' + getParam2('cicuri')) +
+       '&profile=' + profile +
+       '&param.profile=' + profile +
+       '&xmluri=' + escape(getterURL + 'ls?format=xml&baseuri=' + getParam2('cicuri')) +
         '&param.keys=L2H' +
        '&param.uri=' + getParam2('cicuri') +
-       '&param.getterURL=' + getParam2('getterURL') +
-       '&param.proofcheckerURL=' + getParam2('proofcheckerURL') +
-       '&param.draw_graphURL=' + getParam2('draw_graphURL') +
-       '&param.uri_set_queueURL='+getParam2('uri_set_queueURL') +
-       '&param.UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL') +
         '&param.target=cic' +
-       //'&param.interfaceURL=' + location.protocol + "//" + location.host + chopSlash(chopSlash(chopSlash(location.pathname))) +
-       '&param.interfaceURL=' + topurl +
        '" name="cicresult"/>');
   document.write('</frameset>');
   document.write('</frameset>');
index d399941914ad0ab383bc9f70007143785f3f9acc..7d5f6c13b9a3578bc6490af771e64b4e705c4ae9 100644 (file)
@@ -1,7 +1,8 @@
-<html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+"http://www.w3.org/TR/REC-html40/loose.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:subst="http://www.cs.unibo.it/helm/subst">
 
 <head>
-<title>???</title>
 
 <style type="text/css">
 #normal { background-color: #e6e6fa; font-family: sans-serif }
@@ -9,6 +10,8 @@ td.head { font-weight: bold; background-color: #e6e6fa; color: brown }
 td.back { background-color: #e6e6fa; color: brown }
 #indent { margin-left: 1cm; margin-right: 1cm }
 #centered { text-align: center }
+h2     { text-align: center }
+li     { padding-bottom: 1ex }
 </style>
 
 <script language="JavaScript" src="../../javascript/defaults.js"></script>
@@ -18,25 +21,24 @@ td.back { background-color: #e6e6fa; color: brown }
 </head>
 
 <body id="normal">
- <h1>Theory: 
-  &quot;<script>document.write(extractParam(unescape(getParam('url')),'param.CICURI'))</script>&quot;
- &nbsp;&nbsp;&nbsp;<font size="+1">[Annotations have no meaning for theories, yet]</font>
- </h1>
- <table>
+ <h2><subst:base_CICURI/></h2>
+ <ul>
+   <li>
+     <script>
+       var url = "<subst:url/>";
+       document.write('<a href="' + url + '" target="_blank">Open theory in new window</a>');
+     </script>
+   </li>
+ </ul>
+<!--
   <tr>
-   <td>
-    View its metadata
-   </td>
+   <td> View its metadata </td>
    <td>(Not implemented, yet. Coming soon.)</td>
   </tr>
   <tr>
-   <td>
-    Proof-check it
-   </td>
-   <td>
-    (Not ported to V7, yet. Coming soon.)
-   </td>
+   <td> Proof-check it </td>
+   <td> (Not ported to V7, yet. Coming soon.) </td>
   </tr>
- </table>
+-->
 </body>
 </html>
index c2a2ef50463a0224fefeaee74b5e022b340a4690..64dbeb3c921205a5afb50e252c39294f3b12fdf0 100644 (file)
@@ -1,16 +1,24 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
 "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:subst="http://www.cs.unibo.it/helm/subst">
 <head>
- <script language="JavaScript" src="../../javascript/defaults.js"></script>
- <script language="JavaScript" src="../../javascript/utils.js"></script>
- <title>???</script></title>
+ <title><subst:CICURI/></title>
 </head>
 <script>
-  document.write('<frameset onLoad="window.focus()" rows="18%,*" border="0" scrolling="no">');
-  document.write('<frame src="control.html?url=' + getParam('url') +'"/>');
-  document.write('<frame src="' + unescape(getParam('url')) + '" + name="result"/>');
+ var processorURL = "<subst:processorURL/>";
+ var interfaceURL = "<subst:interfaceURL/>";
+ var profile = "<subst:profile/>";
+ var CICURI = "<subst:CICURI/>";
+ var annotations = "<subst:annotations/>";
+ var url = "<subst:makeTheoryURL/>";
+<![CDATA[
+  document.write('<frameset cols="18%,*" border="1" >');
+  document.write('<frame src="' + processorURL + 'apply?keys=RT&profile=' +
+    profile + '&param.annotations=' + annotations + '&param.CICURI=' + CICURI +
+    '&param.url=' + escape(url) + '&xmluri=' +
+    escape(interfaceURL + 'html/theory/control.html') +'"/>');
+  document.write('<frame src="' + url + '&param.toplevel=true" name="result"/>');
   document.write('</frameset>');
+]]>
 </script>
-
 </html>
index 79ed47fd7ef1c626592192a7c9852bc3c2175e1c..bc52d02b617d6a2948d56b65dcaf4d103528d862 100644 (file)
@@ -14,20 +14,14 @@ function updateMode(i, s)
   top.mode = res;
 }
 
-function updateOutput(output,format)
+function updateOutput(output,format,processorURL,interfaceURL)
 {
   var theoryuri = top.theoryuri;
   var cicuri = top.cicuri;
   var mode = top.mode;
-  var topurl = top.topurl;
-  var processorURL = top.processorURL;
-  var getterURL = top.getterURL;
-  var proofcheckerURL = top.proofcheckerURL;
-  var draw_graphURL = top.draw_graphURL;
-  var uri_set_queueURL = top.uri_set_queueURL;
   var mode_list = mode.split(",");
   var new_mode = output.options[output.selectedIndex].value;
-  var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&proofcheckerURL=" + proofcheckerURL + "&draw_graphURL=" + draw_graphURL + "&uri_set_queueURL=" + uri_set_queueURL + "&mode=";
+  var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&mode=";
   
   if (new_mode != mode_list[0]) {
     updateMode(0, new_mode);
@@ -35,17 +29,17 @@ function updateOutput(output,format)
     else updateMode(1, format.options[format.selectedIndex].value);
 
     var href =
-     top.processorURL + 'apply' +
+     processorURL + 'apply' +
      '?keys=RT' +
      '&param.topurl=' + topurl +
      '&xmluri=' +
-     escape(top.topurl + '/html/library/control.html' + dest + top.mode);
+     escape(interfaceURL + '/html/library/control.html' + dest + top.mode);
     
     location.href = href;
   }
 }
 
-function updateFormat(format)
+function updateFormat(format,profile,processorURL,interfaceURL)
 {
   var mode = top.mode;
   var mode_list = mode.split(",");
@@ -56,60 +50,55 @@ function updateFormat(format)
     updateMode(2, format.options[format.selectedIndex].value);
   }
 
-  refreshReload();
+  refreshReload(profile,processorURL,interfaceURL);
 }
 
-function updateNatural(checkbox)
+function updateNatural(checkbox,profile,processorURL,interfaceURL)
 {
   if (checkbox.checked) updateMode(3, "yes");
   else updateMode(3, "no");
-  refreshReload();
+  refreshReload(profile,processorURL,interfaceURL);
 }
 
-function updateAnnotations(checkbox)
+function updateAnnotations(checkbox,profile,processorURL,interfaceURL)
 {
   if (checkbox.checked) updateMode(4, "yes");
   else updateMode(4, "no");
-  refreshReload();
+  refreshReload(profile,processorURL,interfaceURL);
 }
 
-function updateCompressed(checkbox)
+function updateCompressed(checkbox,profile,processorURL,interfaceURL)
 {
   if (checkbox.checked) updateMode(5, "gz");
   else updateMode(5, "normal");
-  refreshReload();
+  refreshReload(profile,processorURL,interfaceURL);
 }
 
-function updateDTDPatched(checkbox)
+function updateDTDPatched(checkbox,profile,processorURL,interfaceURL)
 {
   if (checkbox.checked) updateMode(6, "yes");
   else updateMode(6, "no");
-  refreshReload();
+  refreshReload(profile,processorURL,interfaceURL);
 }
 
-function refreshReload()
+function refreshReload(profile, processorURL, interfaceURL)
 {
    var search = 
       "?mode=" + top.mode +
       "&cicuri=" + top.cicuri +
-      "&theoryuri=" + top.theoryuri +
-      "&processorURL=" + top.processorURL +
-      "&getterURL=" + top.getterURL +
-      "&proofcheckerURL=" + top.proofcheckerURL +
-      "&draw_graphURL=" + top.draw_graphURL +
-      "&uri_set_queueURL=" + top.uri_set_queueURL +
-      "&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL;
+      "&theoryuri=" + top.theoryuri;
 
-   var href =
-    top.processorURL + 'apply' +
+   var href = processorURL +
+    'apply' +
     '?keys=RT' +
-    '&param.topurl=' + top.topurl +
+    '&profile=' + profile +
+    '&param.profile=' + profile +
     '&xmluri=' +
-    escape(top.topurl + '/html/library/index.html' + search);
+    escape(interfaceURL + '/html/library/index.html' + search);
     
    top.frames[0].document.links[0].href = href;
    top.frames[0].document.links[1].href =
-    top.topurl + '/html/index.html' + search;
+    interfaceURL + '/html/index.html' + search;
 
    return true;
 }
@@ -151,22 +140,16 @@ function getCICProofTreeXHTMLMathMLKeys()
   return escape("HAT,G,HAO,L");
 }
 
-function makeURL(type,uri,cicflags,typesflags)
+function makeURL(type,uri,cicflags,typesflags,profile,processorURL,interfaceURL,getterURL)
 {
   var mode = top.mode;
-  var processorURL = top.processorURL;
-  var getterURL = top.getterURL;
-  var proofcheckerURL = top.proofcheckerURL;
-  var draw_graphURL = top.draw_graphURL;
-  var uri_set_queueURL = top.uri_set_queueURL;
-  var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
   var mode_list = mode.split(",");
   
   var keys = "";
   var url = "";
 
-  var interfaceURL = top.topurl + "/html/cic/index.html";
-  var thinterfaceURL = top.topurl + "/html/theory/index.html";
+  var interfaceURLidx = interfaceURL + "/html/cic/index.html";
+  var thinterfaceURLidx = interfaceURL + "/html/theory/index.html";
 
   var output = mode_list[0];
   var format;
@@ -186,12 +169,8 @@ function makeURL(type,uri,cicflags,typesflags)
     var uri_len = uri.length;
     if (format == "html" && type == "cic" && uri.substring(uri.length - 10, uri.length) == "proof_tree") {
       keys = getCICProofTreeXHTMLMathMLKeys() +
-       "&param.processorURL=" + escape(processorURL) +
-       "&param.getterURL=" + escape(getterURL) +
-       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
-       "&param.draw_graphURL=" + escape(draw_graphURL) +
-       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
-       "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
+       "&profile=" + profile +
+       "&default.profile=" + profile +
        "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN")+
        "&prop.doctype-system="+escape("http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd")+
        "&prop.encoding=iso-8859-1" +
@@ -201,16 +180,11 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.encoding=iso-8859-1" +
        "&param.media-type=text/html" +
        "&param.keys=" + getCICHTMLKeys() +
-       "&param.interfaceURL=" + escape(interfaceURL) +
        "&param.framewidth=150";
     } else if (format == "html" && type == "cic") {
       keys = getCICHTMLKeys() +
-       "&param.processorURL=" + escape(processorURL) +
-       "&param.getterURL=" + escape(getterURL) +
-       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
-       "&param.draw_graphURL=" + escape(draw_graphURL) +
-       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
-       "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
+       "&profile=" + profile +
+       "&param.profile=" + profile +
        "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&prop.encoding=iso-8859-1" +
        "&prop.media-type=text/html" +
@@ -218,16 +192,11 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&param.encoding=iso-8859-1" +
        "&param.media-type=text/html" +
-       "&param.keys=" + getCICHTMLKeys() +
-       "&param.interfaceURL=" + escape(interfaceURL);
+       "&param.keys=" + getCICHTMLKeys();
     } else if (format == "html" && type == "theory") {
       keys = getTheoryKeys()+
-       "&param.processorURL=" + escape(processorURL) +
-       "&param.getterURL=" + escape(getterURL) +
-       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
-       "&param.draw_graphURL=" + escape(draw_graphURL) +
-       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
-       "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
+       "&profile=" + profile +
+       "&param.profile=" + profile +
        "&param.keys=" + getCICHTMLKeys() +
        "&param.thkeys=" + getTheoryKeys() +
        "&param.embedkeys=" + getEmbedKeys() +
@@ -235,89 +204,57 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.encoding=iso-8859-1" +
        "&param.thencoding=iso-8859-1" +
        "&param.media-type=text/html" +
-       "&param.thmedia-type=text/html" +
-       "&param.interfaceURL=" + escape(interfaceURL) +
-       "&param.thinterfaceURL=" + escape(thinterfaceURL);
+       "&param.thmedia-type=text/html";
     } else if (format == "mml_cont" && type == "cic") {
       keys = escape("d_c,C1")+
-       "&param.processorURL=" + escape(processorURL) +
-       "&param.getterURL=" + escape(getterURL) +
+       "&profile=" + profile +
+       "&param.profile=" + profile +
        "&prop.doctype-public="+
-       //"&prop.encoding=" +
        "&prop.media-type=text/xml" +
        "&param.doctype-public=" +
        "&param.encoding=" +
        "&param.media-type=text/xml";
     } else if (format == "mml_cont" && type == "theory") {
       keys = escape("T1,L,E")+
-       "&param.processorURL=" + escape(processorURL) +
-       "&param.getterURL=" + escape(getterURL) +
+       "&profile=" + profile +
+       "&param.profile=" + profile +
        "&param.keys=" + escape("d_c,C1") +
        "&param.thkeys=T1,L,E" +
        "&param.embedkeys=" + escape("d_c,TC1") +
-
-       "&param.processorURL=" + escape(processorURL) +
-       "&param.getterURL=" + escape(getterURL) +
-       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
-       "&param.draw_graphURL=" + escape(draw_graphURL) +
-       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&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);
+       "&param.thmedia-type=text/html";
     } else if (format == "mml_pres" && type == "cic") {
       keys = getCICMathMLKeys()+
-       "&param.processorURL=" + escape(processorURL) +
-       "&param.getterURL=" + escape(getterURL) +
-       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
-       "&param.draw_graphURL=" + escape(draw_graphURL) +
-       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
+       "&profile=" + profile +
+       "&param.profile=" + profile +
        "&prop.doctype-public="+
-       //"&prop.encoding=" +
        "&prop.media-type=text/xml" +
        "&param.doctype-public=" +
        "&param.encoding=" +
        "&param.media-type=text/xml" +
-       "&param.keys=" + getCICMathMLKeys() +
-       "&param.interfaceURL=" + escape(interfaceURL);
+       "&param.keys=" + getCICMathMLKeys();
     } else if (format == "mml_pres" && type == "theory") {
       keys = getTheoryKeys()+
+       "&profile=" + profile +
+       "&param.profile=" + profile +
        "&param.keys=" + getCICMathMLKeys() +
        "&param.thkeys=" + getTheoryKeys() +
        "&param.embedkeys=" + escape("d_c,TC1,G,C2,L") +
-       "&param.processorURL=" + escape(processorURL) +
-       "&param.getterURL=" + escape(getterURL) +
-       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
-       "&param.draw_graphURL=" + escape(draw_graphURL) +
-       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&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);
+       "&param.thmedia-type=text/html";
     }
-
-    var naturalLanguage = typesflags.toLowerCase();
-    if (typesflags != "NO" || type == "theory") {
-       naturalLanguage = mode_list[3];
-    }
-    var annotations = cicflags.toLowerCase();
-    if (cicflags != "NO" || type == "theory") {
-       annotations = mode_list[4];
-    }
-    url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "&param.CICURI=" + uri + "&param.naturalLanguage=" + naturalLanguage + "&param.annotations=" + annotations + "&param.topurl=" + top.topurl;
   }
 
   if (output == "raw")
    return url;
   else if (type == "cic")
-   return interfaceURL + "?url=" + escape(url);
+   return processorURL + "apply?keys=RT&xmluri=" + escape(interfaceURLidx) + "&param.ignore=" + keys + "&param.CICURI=" + uri;
   else if (type == "theory")
-   return thinterfaceURL + "?url=" + escape(url)
+   return processorURL + "apply?keys=RT&xmluri=" + escape(thinterfaceURLidx) + "&param.ignore=" + keys + "&param.CICURI=" + uri;
 }
-
index 9302e5841b62a09b62d17013f4800e12a25386b2..80d6946e5e6e7e10407445929d633e2da94f7db8 100644 (file)
 <!-- uri must end with '/' -->
 <xsl:param name="uri" select="''"/>
 <xsl:param name="keys" select="''"/>
+<xsl:param name="processorURL" select="''"/>
 <xsl:param name="getterURL" select="''"/>
 <xsl:param name="interfaceURL" select="''"/>
 <xsl:param name="target" select="''"/>
+<xsl:param name="profile" select="''"/>
 
 <xsl:template name="chop">
  <xsl:param name="uri" select="''"/>
        "top.{$target}uri='{$quoteduri}';
         refresh{$target}Header('{$interfaceURL}/html/library/header.html');
         var search='?keys={$keys}' +
+         '&amp;profile={$profile}' +
+        '&amp;param.profile={$profile}' +
          '&amp;xmluri=' + escape('{$getterURL}ls?format=xml'+'&amp;baseuri={$quoteduri}')+
          '&amp;param.uri={$quoteduri}' +
          '&amp;param.keys={$keys}' +
-         '&amp;param.getterURL={$getterURL}' +
-         '&amp;param.target={$target}' +
-         '&amp;param.interfaceURL={$interfaceURL}';
+         '&amp;param.target={$target}';
         var pathname = this.pathname;
         if (pathname.charAt(0) != '/')
          pathname = '/' + pathname;
    </xsl:variable>
    <xsl:value-of select="$name"/>
    <xsl:text> </xsl:text>
-   <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedname)}','{$ann}','{$types}'));"
+   <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedname)}','{$ann}','{$types}','{$profile}','{$processorURL}','{$interfaceURL}','{$getterURL}'));"
       onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
    >
     <xsl:choose>
    </a>
    <xsl:if test="not($body='NO')">
     <xsl:text> </xsl:text>
-    <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedbodyname)}','{$ann}','{$types}'))"
+    <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedbodyname)}','{$ann}','{$types}','{$profile}','{$processorURL}','{$interfaceURL}','{$getterURL}'))"
        onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
     >Proof term</a>
    </xsl:if>
    <xsl:if test="not($proof_tree='NO')">
     <xsl:text> </xsl:text>
-    <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedprooftreename)}','{$ann}','{$types}'))"
+    <a href="javascript: var _ = window.open(top.frames[0].makeURL('{$target}','{concat($quoteduri,$quotedprooftreename)}','{$ann}','{$types}','{$profile}','{$processorURL}','{$interfaceURL}','{$getterURL}'))"
        onMouseOver="window.status='{concat($quoteduri,$quotedname)}'; return true"
     >Proof tree</a>
    </xsl:if>
diff --git a/helm/on-line/xslt/ls2theory.xsl b/helm/on-line/xslt/ls2theory.xsl
new file mode 100644 (file)
index 0000000..ed9c217
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  xmlns="http://www.w3.org/1999/xhtml"
+>
+
+  <xsl:output method="html" encoding="iso-8859-1"/>
+
+  <xsl:param name="CICURI" select="''" />
+
+  <xsl:template match="ls">
+    <html>
+      <head>
+       <style>
+       </style>
+      </head>
+      <body>
+       <ul>
+         <xsl:apply-templates select="section" />
+         <xsl:apply-templates select="object" />
+       </ul>
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:template match="section">
+    <li>
+      <a class="section" href="{concat($CICURI, text(), '/')}" helm:helm_link="href">
+       <xsl:value-of select="text()" />
+      </a>
+      <xsl:text>/</xsl:text>
+    </li>
+  </xsl:template>
+
+  <xsl:template match="object">
+    <li>
+      <a class="object" href="{concat($CICURI, @name)}" helm:helm_link="href">
+       <xsl:value-of select="@name" />
+      </a>
+    </li>
+  </xsl:template>
+
+</xsl:stylesheet>
index 4be261bcb6cbc6a00c1fc9fc54e36b5d9d166a0f..4f946cbe66af83bcc26c759691c55a69ca556ee4 100644 (file)
 <!-- http://cs.unibo.it/helm/.                                         -->
 
 <xsl:stylesheet version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml" 
+ xmlns:html="http://www.w3.org/1999/xhtml" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:subst="http://www.cs.unibo.it/helm/subst">
 
 <xsl:import href="utils.xsl"/>
+<xsl:import href="links_library.xsl"/>
 
 <!--CSC: code cut & pasted also in metadataLib.xsl -->
 <xsl:param name="uri_set_size" select="''"/>
   </xsl:copy>
 </xsl:template>
 
-<xsl:template match="head">
+<xsl:template match="html:head">
   <xsl:copy>
    <xsl:copy-of select="@*"/>
-   <subst:script language="JavaScript" src="/javascript/defaults.js"/>
-   <subst:script language="JavaScript" src="/javascript/utils.js"/>
-   <subst:script language="JavaScript" src="/javascript/control.js"/>
-   <subst:script language="JavaScript" src="/javascript/graphLinks.js"/>
    <subst:script language="JavaScript" src="/javascript/helmjsmenu.js"/>
    <script>
     var lastX, lastY;
     var selectedURI;
+    var selectedCICURL;
+    var selectedTheoryURL;
+    var selectedForwardURL;
+    var selectedBackwardURL;
    </script>
    <xsl:apply-templates/>
   </xsl:copy>
 </xsl:template>
 
-<xsl:template match="body">
-  <!--CSC: end of cut & paste also in metadataLib.xsl -->
-  <form name="uri_set_size">
-   Number of nodes to show when following an hyperlink:
-   <input type="text" onClick="return false" value="{$uri_set_size}" size="2"/> (30 suggested)
-  </form>
+<xsl:template match="html:body">
   <!--CSC: end of cut & paste also in metadataLib.xsl -->
   <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:attribute name="onClick">hideMenu();</xsl:attribute>
+   <!--CSC: end of cut & paste also in metadataLib.xsl -->
+   <form name="uri_set_size">
+    Number of nodes to show when following an hyperlink:
+    <input type="text" onClick="return false" value="{$uri_set_size}" size="2"/> (30 suggested)
+   </form>
    <xsl:apply-templates/>
    <div style="position: absolute" id="HJMmenu">
     <!-- The two nested tables are for NS 4.0 where every -->
     <table bgColor="green" id="pippo">
      <tr><td>
       <table bgColor="cyan" border="2">
-       <tr><td><a href="" onClick="this.href=mkDepURL(selectedURI);">Objects this one depends on.</a></td></tr>
-       <tr><td><a href="" onClick="this.href=mkCICURL(selectedURI);">Render this object.</a></td></tr>
-       <tr><td><a href="" onClick="this.href=mkMetaTheoryURL(selectedURI);">Objects depending directly on this one.</a></td></tr>
-       <tr><td><a href="" onClick="this.href=mkMetaURL(selectedURI);">Objects depending on this one.</a></td></tr>
+       <tr><td><a href="javascript: var _ = window.open(selectedForwardURL,'_blank')">Objects this one depends on.</a></td></tr>
+       <tr><td><a href="javascript: var _ = window.open(selectedCICURL,'_blank')">Render this object.</a></td></tr>
+       <tr><td><a href="javascript: var _ = window.open(selectedTheoryURL,'_blank')">Objects depending directly on this one.</a></td></tr>
+       <tr><td><a href="javascript: var _ = window.open(selectedBackwardURL,'_blank')">Objects depending on this one.</a></td></tr>
       </table>
      </td></tr>
     </table>
   </xsl:copy>
 </xsl:template>
 
-<xsl:template match = "area">
+<xsl:template match="html:area">
  <xsl:variable name="quoteduri">
   <xsl:call-template name="jsquote">
    <xsl:with-param name="s" select="@href"/>
   </xsl:call-template>
  </xsl:variable>
+ <xsl:variable name="cicurl">
+  <xsl:call-template name="makeURL">
+   <xsl:with-param name="uri" select="@href"/>
+  </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="quotedcicurl">
+  <xsl:call-template name="jsquote">
+   <xsl:with-param name="s" select="$cicurl"/>
+  </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="theoryurl">
+  <xsl:call-template name="makeDirectDependenciesURL">
+   <xsl:with-param name="uri" select="@href"/>
+  </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="quotedtheoryurl">
+  <xsl:call-template name="jsquote">
+   <xsl:with-param name="s" select="$theoryurl"/>
+  </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="forwardURL">
+  <xsl:call-template name="makeForwardGraphURL">
+   <xsl:with-param name="uri" select="@href"/>
+  </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="quotedForwardURL">
+  <xsl:call-template name="jsquote">
+   <xsl:with-param name="s" select="$forwardURL"/>
+  </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="backwardURL">
+  <xsl:call-template name="makeBackwardGraphURL">
+   <xsl:with-param name="uri" select="@href"/>
+  </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="quotedBackwardURL">
+  <xsl:call-template name="jsquote">
+   <xsl:with-param name="s" select="$backwardURL"/>
+  </xsl:call-template>
+ </xsl:variable>
  <xsl:copy>
   <xsl:copy-of select="@*"/> 
   <xsl:if test="starts-with(@href,&quot;cic:&quot;)">
-   <xsl:attribute name="onMouseOver">lastX = getX(event); lastY = getY(event);selectedURI='<xsl:value-of select="$quoteduri"/>';</xsl:attribute>
+   <xsl:attribute name="onMouseOver">lastX = getX(event); lastY = getY(event); selectedURI='<xsl:value-of select="$quoteduri"/>'; selectedCICURL='<xsl:value-of select="$quotedcicurl"/>'; selectedTheoryURL='<xsl:value-of select="$quotedtheoryurl"/>'; selectedForwardURL='<xsl:value-of select="$quotedForwardURL"/>'; selectedBackwardURL='<xsl:value-of select="$quotedBackwardURL"/>';</xsl:attribute>
    <xsl:attribute name="href">javascript:moveMenu(lastX,lastY); showMenu();</xsl:attribute>
   </xsl:if>
   <xsl:apply-templates/>
index 17050ea66ece75060b0a22e2c8f491670081cff9..bd9b84524224ba0f45124a6c9d33f2f852034567 100644 (file)
    <title>Metadata of <xsl:value-of select="$CICURI"/></title>
   </head>
   <body onLoad="window.focus()" bgColor="white">
-   <script>
-     var CICURI = "<xsl:value-of select="$CICURI"/>";
-<![CDATA[
-     document.write('<h1>Metadata of <a href="' + mkCICURL(CICURI) + '">' + CICURI + '</a></h1>');
-]]>
-   </script>
+   <xsl:variable name="CICURL">
+     <xsl:call-template name="makeURL">
+      <xsl:with-param name="uri" select="$CICURI"/>
+     </xsl:call-template>
+   </xsl:variable>
+   <h1>Metadata of <a href="{$CICURL}"><xsl:value-of select="$CICURI"/></a></h1>
    <xsl:apply-templates select="*"/>
    <!--CSC: code almost cut & pasted from makeGraphLinks -->
    <form name="uri_set_size">
     </script>
    </p>
    <p>
-    <script>
-<![CDATA[
-     document.write('<a href="" onClick="window.open(mkMetaURL(\']]><xsl:value-of select="$quotedCICURI"/><![CDATA[\'),\'graph\');return false;">View the graph of all the objects depending on this one.</a>');
-]]>
-    </script>
+     <xsl:variable name="forwardURL">
+      <xsl:call-template name="makeGraphURL">
+       <xsl:with-param name="uri" select="$CICURI"/>
+       <xsl:with-param name="keys" select="'MMG'"/>
+       <!-- <xsl:with-param name="uri_set_size" select="'document.uri_set_size.elements[0].value'"/> -->
+       <xsl:with-param name="uri_set_size" select="'30'"/>
+      </xsl:call-template>
+     </xsl:variable>
+     <a href="{$forwardURL}">View the graph of all the objects depending on this one.</a>
    </p>
   </xsl:when>
   <xsl:otherwise>
  <xsl:choose>
   <xsl:when test="document(concat($BaseRDFURLForward,$quotedCICURIforURL))/*/*/*">
    <p>
-    <!-- CSC: Cut & Paster from above ==> create a single javascript function -->
-    <script>
-<![CDATA[
-     document.write('<a href="" onClick="window.open(mkDepURL(\']]><xsl:value-of select="$quotedCICURI"/><![CDATA[\'),\'graph\');return false;">View the graph of all the dependencies of this object.</a>');
-]]>
-    </script>
+     <xsl:variable name="forwardURL">
+      <xsl:call-template name="makeGraphURL">
+       <xsl:with-param name="uri" select="$CICURI"/>
+       <xsl:with-param name="keys" select="'MDG'"/>
+       <!-- <xsl:with-param name="uri_set_size" select="'document.uri_set_size.elements[0].value'"/> -->
+       <xsl:with-param name="uri_set_size" select="'30'"/>
+      </xsl:call-template>
+     </xsl:variable>
+     <a href="{$forwardURL}">View the graph of all the dependencies of this object.</a>
    </p>
   </xsl:when>
   <xsl:otherwise>
index 6cfe0eda0417efbb802da2454d876cecc0d17728..50fd991fc14845bbb8fad0c64d6f953de9614fad 100644 (file)
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                               xmlns:subst="http://www.cs.unibo.it/helm/subst">
 
+<xsl:import href="links_library.xsl"/>
+<xsl:import href="params.xsl"/>
+
 <xsl:output
            method="html" 
            encoding="ISO-8859-1" 
            media-type="text/html" />
 
-<xsl:param name="topurl" select="''"/>
+<xsl:param name="proofcheckerURL" select="''"/>
+<xsl:param name="interfaceURL" select="''"/>
+<xsl:param name="processorURL" select="''"/>
+<xsl:param name="getterURL" select="''"/>
+<xsl:param name="draw_graphURL" select="''"/>
+<xsl:param name="profile" select="''"/>
+<xsl:param name="url" select="''"/>
+<xsl:param name="CICURI" select="''"/>
+<xsl:param name="annotations" select="''"/>
 
 <xsl:template match="subst:script">
- <xsl:copy-of select="document(concat($topurl,@src,'_xml'))" />
+ <xsl:copy-of select="document(concat($interfaceURL,@src,'_xml'))" />
+</xsl:template>
+
+<xsl:template match="subst:proofcheckerURL">
+ <xsl:value-of select="$proofcheckerURL"/>
+</xsl:template>
+
+<xsl:template match="subst:interfaceURL">
+ <xsl:value-of select="$interfaceURL"/>
+</xsl:template>
+
+<xsl:template match="subst:processorURL">
+ <xsl:value-of select="$processorURL"/>
+</xsl:template>
+
+<xsl:template match="subst:getterURL">
+ <xsl:value-of select="$getterURL"/>
+</xsl:template>
+
+<xsl:template match="subst:draw_graphURL">
+ <xsl:value-of select="$draw_graphURL"/>
+</xsl:template>
+
+<xsl:template match="subst:profile">
+ <xsl:value-of select="$profile"/>
+</xsl:template>
+
+<xsl:template match="subst:url">
+ <xsl:value-of select="$url"/>
+</xsl:template>
+
+<xsl:template match="subst:CICURI">
+ <xsl:value-of select="$CICURI"/>
+</xsl:template>
+
+<xsl:template match="subst:base_CICURI">
+  <xsl:variable name="len" select="string-length($CICURI)" />
+  <xsl:variable name="extension">
+    <xsl:choose>
+      <xsl:when test="substring($CICURI,$len)='/'">#</xsl:when>
+      <xsl:when test="substring($CICURI,$len - 6)='.theory'">.theory</xsl:when>
+      <xsl:when test="substring($CICURI,$len - 3)='.con'">.con</xsl:when>
+      <xsl:when test="substring($CICURI,$len - 3)='.ind'">.ind</xsl:when>
+      <xsl:when test="substring($CICURI,$len - 3)='.var'">.var</xsl:when>
+      <xsl:when test="substring($CICURI,$len - 8)='.con.body'">.con.body</xsl:when>
+      <xsl:otherwise>
+<!--
+       <xsl:message terminate="no">
+         resolve_topurl.xsl: assertion failed
+       </xsl:message>
+-->
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:call-template name="name_of_uri">
+    <xsl:with-param name="uri">
+      <xsl:choose>
+       <xsl:when test="substring($CICURI,$len)='/'">
+         <xsl:value-of select="concat(substring($CICURI,1,$len - 1),'#')" />
+       </xsl:when>
+       <xsl:otherwise>
+         <xsl:value-of select="$CICURI" />
+       </xsl:otherwise>
+      </xsl:choose>
+    </xsl:with-param>
+    <xsl:with-param name="extension" select="$extension" />
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="subst:annotations">
+ <xsl:value-of select="$annotations"/>
+</xsl:template>
+
+<xsl:template match="subst:makeURL">
+ <xsl:call-template name="makeURL">
+  <xsl:with-param name="uri" select="$CICURI"/>
+  <xsl:with-param name="createframeset" select="false()"/>
+ </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="subst:topurl">
- <xsl:value-of select="$topurl"/>
+<xsl:template match="subst:makeTheoryURL">
+ <xsl:call-template name="makeTheoryURL">
+  <xsl:with-param name="uri" select="$CICURI"/>
+  <xsl:with-param name="createframeset" select="false()"/>
+ </xsl:call-template>
 </xsl:template>
 
 <xsl:template match="/|*">
diff --git a/helm/on-line/xslt/toplevel_header.xsl b/helm/on-line/xslt/toplevel_header.xsl
new file mode 100644 (file)
index 0000000..4dc5a88
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:ht="http://www.cs.unibo.it/helm/namespaces/helm-theory"
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  xmlns:html="http://www.w3.org/1999/xhtml">
+
+<!-- add theory's breadcrumb trail -->
+<xsl:template name="breadcrumb_trail">
+  <xsl:param name="path" select="''" />
+  <xsl:param name="acc" select="''" />
+  <xsl:choose>
+    <xsl:when test="contains($path, '/')">
+      <xsl:variable name="segment" select="substring-before($path,'/')" />
+      <xsl:variable name="newacc" select="concat($acc, $segment, '/')" />
+      <html:a style="text-decoration: none" href="{$newacc}" helm:helm_link="href">
+       <xsl:value-of select="$segment" />
+      </html:a>
+      <xsl:text>/</xsl:text>
+      <xsl:call-template name="breadcrumb_trail">
+       <xsl:with-param name="path" select="substring-after($path,'/')" />
+       <xsl:with-param name="acc" select="$newacc" />
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$path" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="add_breadcrumb_trail">
+  <xsl:param name="CICURI" select="''"/>
+<!--   <xsl:param name="prefix" select="''"/> -->
+  <xsl:variable name="prefix" select="substring-before($CICURI, ':')" />
+  <html:h3 style="font-family: sans-serif">
+    <html:a style="text-decoration: none" href="{concat($prefix, ':/')}">
+      <xsl:value-of select="concat($prefix, ':')" />
+    </html:a>
+    <xsl:text>/</xsl:text>
+    <xsl:call-template name="breadcrumb_trail">
+      <xsl:with-param name="path" 
+       select="substring($CICURI, string-length($prefix)+3)" />
+      <xsl:with-param name="acc" select="concat($prefix, ':/')" />
+    </xsl:call-template>
+  </html:h3>
+  <html:hr />
+</xsl:template>
+
+</xsl:stylesheet>
index 2f27d8e6fa70b6f6e98bb540906bd2b3d99b38b6..7d1abeb38276cc04967c6e9264b420e7336c9d9d 100644 (file)
@@ -1,7 +1,9 @@
 getParam.xsl
 ls2html.xsl
+ls2theory.xsl
 makeGraphLinks.xsl
 metadataControl.xsl
 metadataLib.xsl
 resolve_topurl.xsl
+toplevel_header.xsl
 utils.xsl
index 0e120ed904e852de28c4a2f591ebe263ecad7a44..fa91efcffbc9dada5665f5827f6691ce8b59d774 100644 (file)
@@ -45,12 +45,7 @@ function initialize()
 // @variable@ will be substituted by the searchEngine with the param.variable
 // argument value
 var processorURL="@processorURL@";
-var getterURL="@getterURL@";
 var thkeys="@thkeys@";
-var proofcheckerURL="@proofcheckerURL@";
-var draw_graphURL="@draw_graphURL@";
-var uri_set_queueURL="@uri_set_queueURL@";
-var UNICODEvsSYMBOL="@UNICODEvsSYMBOL@";
 var keys="@keys@";
 var thkeys="@thkeys@";
 var embedkeys="@embedkeys@";
@@ -59,25 +54,18 @@ var encoding="@encoding@";
 var thencoding="@thencoding@";
 var media_type="@media-type@";
 var thmedia_type="@thmedia-type@";
-var interfaceURL="@interfaceURL@";
-var thinterfaceURL="@thinterfaceURL@";
 var CICURI="@CICURI@";
 var naturalLanguage="@naturalLanguage@";
 var annotations="@annotations@";
-var interface_topurl="@topurl@";
 
 function ask_uwobo(url)
        {
          return (top.topurl+"/ask_uwobo?url="+
                  encodeURIComponent(processorURL + "apply?" +
                          "xmluri=" + encodeURIComponent(url) +
+                         "&profile=default" +
+                         "&param.profile=default" +
                          "&keys=" + encodeURIComponent(thkeys) +
-                         "&param.processorURL=" + encodeURIComponent(processorURL) +
-                         "&param.getterURL=" + encodeURIComponent(getterURL) +
-                         "&param.proofcheckerURL=" + encodeURIComponent(proofcheckerURL) +
-                         "&param.draw_graphURL=" + encodeURIComponent(draw_graphURL) +
-                         "&param.uri_set_queueURL=" + encodeURIComponent(uri_set_queueURL) +
-                         "&param.UNICODEvsSYMBOL=" + encodeURIComponent(UNICODEvsSYMBOL) +
                          "&param.keys=" + encodeURIComponent(keys) +
                          "&param.thkeys=" + encodeURIComponent(thkeys) +
                          "&param.embedkeys=" + encodeURIComponent(embedkeys) +
@@ -86,12 +74,9 @@ function ask_uwobo(url)
                          "&param.thencoding=" + encodeURIComponent(thencoding) +
                          "&param.media-type=" + encodeURIComponent(media_type) +
                          "&param.thmedia-type=" + encodeURIComponent(thmedia_type) +
-                         "&param.interfaceURL=" + encodeURIComponent(interfaceURL) +
-                         "&param.thinterfaceURL=" + encodeURIComponent(thinterfaceURL) +
                          "&param.CICURI=" + encodeURIComponent(CICURI) +
                          "&param.naturalLanguage=" + encodeURIComponent(naturalLanguage) +
                          "&param.annotations=" + encodeURIComponent(annotations) +
-                         "&param.topurl=" + encodeURIComponent(interface_topurl) +
                          "&prop.method=html" +
                          "&param.expandasking=" + encodeURIComponent(top.topurl)));
        }