]> matita.cs.unibo.it Git - helm.git/commitdiff
generate HTML templates using XSLT starting from a bunch of .src files
authorStefano Zacchiroli <zack@upsilon.cc>
Wed, 16 Mar 2005 15:56:44 +0000 (15:56 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Wed, 16 Mar 2005 15:56:44 +0000 (15:56 +0000)
helm/searchEngine/html/Makefile [new file with mode: 0644]
helm/searchEngine/html/includes.xsl [new file with mode: 0644]
helm/searchEngine/html/index.html [deleted file]
helm/searchEngine/html/moogle.html
helm/searchEngine/html/moogle.html.src [new file with mode: 0644]
helm/searchEngine/html/moogle_chat.html [deleted file]
helm/searchEngine/html/moogle_chat.html.src [new file with mode: 0644]
helm/searchEngine/html/moogle_form.html.src [new file with mode: 0644]
helm/searchEngine/html/moogle_header.html.src [new file with mode: 0644]
helm/searchEngine/html/moogle_querybar.html.src [new file with mode: 0644]
helm/searchEngine/html/moogle_trailer.html.src [new file with mode: 0644]

diff --git a/helm/searchEngine/html/Makefile b/helm/searchEngine/html/Makefile
new file mode 100644 (file)
index 0000000..03a653f
--- /dev/null
@@ -0,0 +1,7 @@
+INC_STYLESHEET = includes.xsl
+TARGETS = moogle.html moogle_chat.html
+all: $(TARGETS)
+clean:
+       rm -f $(TARGETS)
+%.html: %.html.src *.src
+       xsltproc $(INC_STYLESHEET) $< > $@
diff --git a/helm/searchEngine/html/includes.xsl b/helm/searchEngine/html/includes.xsl
new file mode 100644 (file)
index 0000000..bc2497d
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  version="1.0"
+>
+  <xsl:template match="/|@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()" />
+    </xsl:copy>
+  </xsl:template>
+  <xsl:template match="helm:include">
+    <xsl:apply-templates select="document(@href)/*[1]/*" />
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/helm/searchEngine/html/index.html b/helm/searchEngine/html/index.html
deleted file mode 100644 (file)
index fa91efc..0000000
+++ /dev/null
@@ -1,626 +0,0 @@
-<HTML>
-<HEAD>
-<SCRIPT language="Javascript">
-var query="*"; // stringa che contiene la query nel suo stato attuale.
-var storeps=1;
-var storepv=1;
-var storepb=1; // queste tre variabili contengono il numero da assegnare al prossimo simbolo set, val o boole per creare il link nel frame in alto a sinistra.
-var stadd; // contiene la stringa da aggiungere alla query.
-var fb; // contiene la stringa da aggiungere alla query prima che i set,val e boole siano convertiti in link.
-var ltr="*"; // qui viene memorizzato qual è l' ultimo link su cui si è cliccato.
-var norvars=0;
-var nosvars=0;
-var novvars1=0;
-var novvars2=0; // queste tre variabili servono per sapere dove memorizzare i nomi delle rvar,svar e vvar inserite dall' utente. 
-var wrong=0;
-var ricordaliaslist=0;
-var actinput=0;
-var numeroazioniannullate=0;
-var terminecic="";var listaliases="";var choices="";var interpretation_choices="";var vlds=new Array();//contengono i parametri per dialogare col server in caso di ambiguità nella Match Conclusion.
-aliasglob=new Array();//per conservare la lista degli alias
-function initialize()
-       {
-       rvars=new Array(100);
-       svars=new Array(100);
-       vvars1=new Array(100);
-       vvars2=new Array(100); // contengono le rvar,svar e vvar inserite dall' utente. 
-       storia=new Array();
-       storia[0]="*";
-       norvars=0;
-       nosvars=0;
-       novvars1=0;
-       novvars2=0;
-       ltr="*";
-       query="*";
-       storeps=1;
-       storepv=1;
-       storepb=1;
-       ricordaliaslist=0;
-       vlds=new Array();
-       aliasglob=new Array();
-       actinput=0;
-       numeroazioniannullate=0;
-       }
-
-// @variable@ will be substituted by the searchEngine with the param.variable
-// argument value
-var processorURL="@processorURL@";
-var thkeys="@thkeys@";
-var keys="@keys@";
-var thkeys="@thkeys@";
-var embedkeys="@embedkeys@";
-var doctype_public="@doctype-public@";
-var encoding="@encoding@";
-var thencoding="@thencoding@";
-var media_type="@media-type@";
-var thmedia_type="@thmedia-type@";
-var CICURI="@CICURI@";
-var naturalLanguage="@naturalLanguage@";
-var annotations="@annotations@";
-
-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.keys=" + encodeURIComponent(keys) +
-                         "&param.thkeys=" + encodeURIComponent(thkeys) +
-                         "&param.embedkeys=" + encodeURIComponent(embedkeys) +
-                         "&param.doctype-public=" + encodeURIComponent(doctype_public) +
-                         "&param.encoding=" + encodeURIComponent(encoding) +
-                         "&param.thencoding=" + encodeURIComponent(thencoding) +
-                         "&param.media-type=" + encodeURIComponent(media_type) +
-                         "&param.thmedia-type=" + encodeURIComponent(thmedia_type) +
-                         "&param.CICURI=" + encodeURIComponent(CICURI) +
-                         "&param.naturalLanguage=" + encodeURIComponent(naturalLanguage) +
-                         "&param.annotations=" + encodeURIComponent(annotations) +
-                         "&prop.method=html" +
-                         "&param.expandasking=" + encodeURIComponent(top.topurl)));
-       }
-function help(w) // quando invocata, visualizza l' help relativo ad un oggetto. Di solito è legata ad un evento onFocus o onMouseOver.  
-       {
-       hw.document.close();
-       switch (w)      {
-                       case -10: hw.document.write("Insert an <a href="+top.topurl+top.action+"grammarpdq.html#Id target=gw>Id</a> or an <a href="+top.topurl+top.action+"grammarpdq.html#Uri target=gw>Uri</a> here.")
-                               break;
-                       case -9: hw.document.write("By clicking this you may add or remove aliases as you wish.")
-                               break;
-                       case -81: hw.document.write("Allows you to recover your last input")
-                               break;
-                       case -8: hw.document.write("Allows you to delete your last input")
-                               break;
-                       case -7: hw.document.write("Erases your query and starts a new pre-defined query, you will keep your list of aliases.")
-                               break;
-                       case -6: hw.document.write("Puts this string in the current cursor position. This button works only with Internet Explorer.")
-                               break;
-                       case -5: hw.document.write("Erases your query and starts a new one.")
-                               break;
-                       case -4: hw.document.write("If you click this your query will be processed and the results will appear in the frame above.")
-                               break;
-                       case -3: hw.document.write("Substitutes your query with the text written in the area above. Unless you have a good knowledge of MathQL, it's recommended that you use this only to recover errors.")
-                               break;
-                       case -2: hw.document.write("This is the edit/submit window. You can modify your query here, but be aware that no syntax check will be performed and that if you enter a <a href="+top.topurl+top.action+"grammar.html#rvar target=gw>variable</a> it won't be available for quick composition later. You may also want to add a <a href="+top.topurl+top.action+"grammar.html#set target=gw>set</a>, a <a href="+top.topurl+top.action+"grammar.html#val target=gw>val</a> or a <a href="+top.topurl+top.action+"grammar.html#boole target=gw>boole</a> somewhere in the query. If you do, write '&lt;set&gt;','&lt;val&gt;' or '&lt;bol&gt;' in the point you'd like it to appear, or use the buttons on the right if you are using IE. When you're done with the query, click the Submit button.")
-                               break;
-                       case -1: hw.document.write("You may see the grammar here.")
-                               break;
-                       case 0: hw.document.write("")
-                               break;
-                       case 1: hw.document.write("You may enter an arbitrary statement here; be careful since syntax errors won't be detected.");                              
-                               break;  
-                       case 2: hw.document.write("Enter an <a href="+top.topurl+top.action+"grammar.html#attr_list target=gw>attr_list</a> here.");
-                               break;
-                       case 3: hw.document.write("Enter an <a href="+top.topurl+top.action+"grammar.html#id target=gw>id</a> here.");
-                               break;
-                       case 4: hw.document.write("You must select one previously entered <a href="+top.topurl+top.action+"grammar.html#rvar target=gw>rvar</a>. If you haven't already entered at least one, you can't choose this. ");
-                               break;
-                       case 5: hw.document.write("Enter a <a href="+top.topurl+top.action+"grammar.html#path target=gw>path</a> here.");
-                               break;
-                       case 6: hw.document.write("You must select one previously entered <a href="+top.topurl+top.action+"grammar.html#svar target=gw>svar</a>. If you haven't already entered at least one, you can't choose this. ");
-                               break;
-                       case 7: hw.document.write("Enter a <a href="+top.topurl+top.action+"grammar.html#string_list target=gw>string_list</a> here.");
-                               break;
-                       case 8: hw.document.write("You must select one <a href="+top.topurl+top.action+"grammar.html#vvar target=gw>vvar</a> previously entered as an 'attr'. If you haven't already entered at least one, you can't choose this. ");
-                               break;
-                       case 81: hw.document.write("You must select one <a href="+top.topurl+top.action+"grammar.html#vvar target=gw>vvar</a> previously entered in a 'let' statement. If you haven't already entered at least one, you can't choose this. ");
-                               break;
-                       case 9: hw.document.write("Enter a single <a href="+top.topurl+top.action+"grammar.html#quoted_string target=gw>quoted_string</a> here.");
-                               break;
-                       }       
-       }
-function tpa(quotpath)
-       {
-       while (quotpath.indexOf("<")>-1)
-               {quotpath=quotpath.replace("<","&lt;");}
-       while (quotpath.indexOf(">")>-1)
-               {quotpath=quotpath.replace(">","&gt;");}
-       return (quotpath);
-       }
-function idcheck(ident)
-       {
-       lettera=/[a-zA-Z]/;
-       partediid=/[a-zA-Z0-9_\-\']/;
-       if (!lettera.test(ident.charAt(0))){alert("an Id must begin with a letter.");return(0)}
-       while (ident.length>0)
-               {
-               ident=ident.substring(1,(ident.length));
-               if (ident.length>0){
-               if (!partediid.test(ident.charAt(0))){alert(ident.charAt(0)+" is not a valid character for an Id.");return(0);}
-               }}
-       return(1)
-       }
-function uricheck(ident)
-       {
-       cifra=/[0-9]/
-       cic=ident.substring(0,5);//alert(cic);
-       if (cic!="cic:/"){alert("an Uri must begin with the string 'cic:/'");return(0);}
-       ident=ident.substring(5,ident.length);//alert(ident);
-       if (ident.indexOf(".")<0){alert("an Uri must contain a '.'");return(0);}
-       ident1=ident.substring(0,ident.indexOf("."));//alert(ident1);
-       ident2=ident.substring(ident.indexOf(".")+1,ident.length);//alert(ident2);
-       while (ident1.length>0)
-               {       
-               if (ident1.indexOf("/")>-1)             
-                       {
-                       if (idcheck(ident1.substring(0,ident1.indexOf("/")))==0){return (0)}
-                       ident1=ident1.substring(ident1.indexOf("/")+1,ident1.length);//alert(ident1);
-                       }
-               else {if (idcheck(ident1)==0){return (0)}       
-                       ident1="";}
-               }
-       if (ident2=="con"||ident2=="var"){return(1)}
-       if (ident2.substring(0,6)!="ind#1/"){alert ("syntax error in the Uri.");return(0);}
-       ident2=ident2.substring(6,ident2.length);//alert(ident2);
-       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
-       if (ident2.indexOf("/")>-1)
-               {
-               while (ident2.charAt(0)!="/")
-                       {
-                       //alert(ident2);
-                       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
-                       ident2=ident2.substring(1,ident2.length);
-                       }
-               }
-       while (ident2.length>0)
-               {
-               //alert(ident2);
-               ident2=ident2.substring(1,ident2.length);
-               if (ident2.length>0){
-               if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
-               }}
-       
-       return(1)
-       }
-function gramcheck(how,what) // esegue il controllo sintattico sulla stringa "what", controllando che rispetti i requisiti indicati dalla clausola "how". Se qualcosa non è ok, la variabile "wrong" viene posta ad 1 e la stringa da aggiungere viene ignorata, mentre viene visualizzato un apposito messaggio di errore.             
-       {
-       var slash=0;
-       var alpha=/[A-Za-z:_]/
-       var numero=/[0-9]/
-       switch (how)    {               
-                       case "qsl": // lista di quoted string
-                               if (what.charAt(0)!="{") {gramcheck("qs",what);break;}
-                               if (what.charAt(what.length-1)!="}") {alert ("The list must end with a '}'.");wrong=1;break;}
-                               what=what.substring(1,what.length-1);//alert (what);
-                               while (what.indexOf("\",\"")>-1)
-                                       {
-                                       as=what.substring(0,what.indexOf("\",\"")+1);//alert(as);
-                                       what=what.substring(what.indexOf("\",\"")+2,what.length);//alert(what);
-                                       gramcheck("qs",as);
-                                       }
-                               gramcheck("qs",what);
-                               break;
-                       case "qp": // quoted path
-                               if (what.charAt(0)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
-                               if (what.charAt(what.length-1)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
-                               while (what.indexOf("\"/\"")>-1)
-                                       {
-                                       as=what.substring(0,what.indexOf("\"/\"")+1);//alert(as);
-                                       what=what.substring(what.indexOf("\"/\"")+2,what.length);//alert(what);
-                                       gramcheck("qs",as);
-                                       }
-                               gramcheck("qs",what);
-                               break;
-                       case "qs": // quoted string
-                               if (what.charAt(0)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
-                               if (what.charAt(what.length-1)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
-                               what=what.substring(0,what.length-1);//alert (what);
-                               if (wrong==1) break;
-                               else while (what.length>0)
-                                       {
-                                       what=what.substring(1,what.length);
-                                       if (what.charAt(0)=="\"" && slash==0) {alert ("A \" in a quoted string must be preceded by a \\.");wrong=1;break;} 
-                                       if (what.charAt(0)=="\\") {slash=1} else {slash=0} 
-                                       if (slash==1 && what.length==1) {alert ("A \\ in a quoted string must be followed by something.");wrong=1;}
-                                       }
-                               break;
-                       case "vlist": // lista di vvar (tutto ciò che si trova dopo "attr")
-                               //alert(what.substring(0,4));                           
-                               if ((what.substring(0,4))!="attr"){wrong=1;alert("A vvar_list must begin with the word 'attr'")}
-                               what=what.substring(5,(what.length));vl=what;
-                               //alert(what+"what");
-                               while (what.length>0)
-                                                       {
-                                                       if (what.indexOf(",")>0) {vv=(what.substring(0,what.indexOf(",")));}
-                                                       else {vv=what}                                  
-                               //alert(vv+"vv");
-                                                       if (vv.charAt(0)!="$"){wrong=1;alert("A vvar must begin with a '$'");}
-                                                       if (vv.indexOf("<-")>0)
-                                                                       {
-                                                                       what=what.substring(vv.length+1,what.length);
-                               //alert(what+" nuovowhat "+wrong);
-                                                                       path=vv.substring(vv.indexOf("<-")+2,vv.length);
-                               //alert(path+" path "+wrong);
-                                                                       gramcheck("qp",path); 
-                                                                       vv=vv.substring(1,(vv.indexOf("<-")));
-                               //alert(vv+" vv "+wrong);
-                                                                       gramcheck("id",vv);
-                                                                       }
-                                                       else {wrong=1;alert("An Assign must contain a '<-'.");what="";}
-                               //alert (what+"what");  
-                                                       }
-                               break;
-                       case "id":
-                               //alert (what.charAt(0));
-                               if (!alpha.test(what.charAt(0))) {wrong=1;alert("An ID must begin with a letter , ':' , or '_' .");}
-                               while (what.length>1)   {
-                                       what=what.substring(1,(what.length));
-                                       if (!alpha.test(what.charAt(0)) && !numero.test(what.charAt(0)))
-                                       {wrong=1;alert(what.charAt(0)+" is not a valid character for an id.");}
-                                       //document.write(what+"<BR>");
-                                                       }       
-                               break;
-                       }
-       
-       if (how=="vlist" && wrong==0) // nel caso in cui sia stato eseguito il controllo su una lista di vvar e non siano stati riscontrati errori, tutte le variabili inserite vengono memorizzate.
-               {
-               while (vl.length>0)
-                       {
-                       if (vl.indexOf(",")>-1)
-                               {
-                               vvars2[novvars2++]=vl.substring(0,vl.indexOf("<"));
-                               vl=vl.substring(vl.indexOf(",")+1,vl.length);
-                               }
-                       else    
-                               {
-                               vvars2[novvars2++]=vl.substring(0,vl.indexOf("<"));;
-                               vl="";
-                               }                                               
-                       }
-               //alert ("esco dal loop");
-               }
-       if (wrong==0) {cw.inputok=1} else stadd="";
-       }
-function savelink(n,t) // invocata quando si clicca su un link, memorizza quale di questi debba poi essere sostituito. 
-       {
-       if (t=='s') { top.ltr="[?set"+String(n)+"]";}
-       if (t=='v') { top.ltr="[?val"+String(n)+"]";}
-       if (t=='b') { top.ltr="[?bol"+String(n)+"]";}
-//     alert(ltr);
-       }
-function aggcw() // invocata automaticamente ad ogni modifica della variabile "query", fa apparire nel frame in alto a destra il menu di composizione relativo al primo link della query. Consente quindi di comporre tutta la query senza mai cliccare su alcun link. 
-       {
-       pq=query;
-       while (pq.length>0)
-               {
-               if (pq.indexOf("[?")>-1)        
-                       {
-                       ltr=pq.slice(pq.indexOf("[?"));
-                       ltr=ltr.substring(ltr.indexOf("[?"),(ltr.length-ltr.indexOf("[?"))-(ltr.length-ltr.indexOf("]")-1));
-                       wto=ltr.substring(2,5);
-                       if (wto=="set") {window.open(top.topurl+action+"set.html","cw");pq="";}
-                       else if (wto=="val") {window.open(top.topurl+action+"val.html","cw");pq="";}
-                       else if (wto=="bol") {window.open(top.topurl+action+"boole.html","cw");pq="";}
-                       else pq=pq.substring(pq.indexOf("[?")+2,pq.length);
-                       }
-               else {window.open(top.topurl+action+"blank.html","cw");pq="";}
-               } 
-       }
-function aggform() // aggiorna il form nel frame centrale. Invocata ad ogni cambio della variabile "query".
-       {
-       cquery=query;
-       while (cquery.indexOf("<")>-1)
-               {
-               cquery=cquery.replace(cquery.substring(cquery.indexOf("<"),cquery.indexOf(">")+1),"");
-               //alert(cquery);
-               }
-       while (cquery.indexOf("[?")>-1)
-               {
-               //alert(cquery);
-               if (cquery.indexOf("]")>-1)
-                       {
-                       while (cquery.indexOf("]")<cquery.indexOf("[?") && cquery.indexOf("]")>-1)
-                       {cquery=cquery.replace("]","q+u+a+d+r+a+c+h+i+u+s+a");}//alert("loop"+cquery.indexOf("]")+cquery.indexOf("[?"))}
-                       ag1=cquery.slice(cquery.indexOf("[?"));//alert(ag1);
-                       ag1=ag1.substring(ag1.indexOf("[?"),(ag1.length-ag1.indexOf("[?"))-(ag1.length-ag1.indexOf("]")));//alert(ag1);
-                       ag2=ag1.substring(2,5);//alert(ag2);
-                       if (ag2=="set") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<set>");
-                       else if (ag2=="val") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<val>");
-                       else if (ag2=="bol") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<boole>");
-                       else cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("[?")+1),"q+u+a+d+r+a");
-                       //alert(cquery);
-                       }
-               else {cquery=cquery.replace("[?","q+u+a+d+r+a?")}
-               //alert(cquery);        
-               }
-       while (cquery.indexOf("q+u+a+d+r+a+c+h+i+u+s+a")>-1)
-               {
-               cquery=cquery.replace("q+u+a+d+r+a+c+h+i+u+s+a","]");
-               }
-       while (cquery.indexOf("q+u+a+d+r+a")>-1)
-               {
-               cquery=cquery.replace("q+u+a+d+r+a","[");
-               }
-       while (cquery.indexOf("&lt;")>-1)
-               {
-               cquery=cquery.replace("&lt;","<");
-               }
-       while (cquery.indexOf("&gt;")>-1)
-               {
-               cquery=cquery.replace("&gt;",">");
-               }
-       top.sw.agg();
-       }
-function ripristina()
-       {
-       //alert (actinput+" "+storia.length);
-       if (numeroazioniannullate>0)
-               {
-               numeroazioniannullate--;
-               query=storia[actinput+1];actinput++;
-               qw.document.close();
-               qw.document.write(query);
-               aggform();
-               sw.apply();
-               aggcw();
-               cw.focus();
-               }
-       }
-function annulla()
-       {
-       //alert (actinput+" "+storia.length);
-       if (actinput>0)
-               {
-               numeroazioniannullate++;
-               query=storia[actinput-1];actinput--;
-               qw.document.close();
-               qw.document.write(query);
-               aggform();
-               sw.apply();
-               if (query=="*"){cw.location=top.topurl+action+"set.html";ltr="*";} else {aggcw();}
-               cw.focus();
-               }
-       }
-function parse() // prende la stringa che si sta tentando di inserire nella query, aggiunge i link dove necessario e mette il risultato nella variabile "fb"
-       {
-       while (fb.indexOf("[set]")>-1){
-       if (fb.indexOf("set")>0)
-               {
-      fb=fb.replace("[set]","<A HREF="+top.topurl+action+"set.html target=cw onclick=top.savelink("+top.storeps+",'s')>[?set"+top.storeps+"]</A>");
-               top.storeps++;
-               }
-                                        }
-       while (fb.indexOf("[val]")>-1){
-       if (fb.indexOf("val")>0)
-               {
-      fb=fb.replace("[val]","<A HREF="+top.topurl+action+"val.html target=cw onclick=top.savelink("+top.storepv+",'v')>[?val"+top.storepv+"]</A>");
-               top.storepv++;
-               }
-                                        }
-       while (fb.indexOf("[boole]")>-1){
-       if (fb.indexOf("boole")>0)
-               {
-               fb=fb.replace("[boole]","<A HREF="+top.topurl+action+"boole.html target=cw onclick=top.savelink("+top.storepb+",'b')>[?bol"+top.storepb+"]</A>");
-               top.storepb++;
-               }
-                                        }
-       }
-function aggq() // aggiorna la query sostituendo l' ultimo link editato con la stringa inserita, poi aggiorna tutti i frame.
-       {
-       //window.open(top.topurl+action+"summary.html","cw");
-       qw.document.close();
-       fb=stadd;       
-       nst=ltr.substring(5,(ltr.length-1));// alert(nst+" "+ltr);
-       query=query.replace("<A HREF="+top.topurl+action+"set.html target=cw onclick=top.savelink("+nst+",'s')>"+ltr+"</A>",ltr);
-       query=query.replace("<A HREF="+top.topurl+action+"val.html target=cw onclick=top.savelink("+nst+",'v')>"+ltr+"</A>",ltr);
-       query=query.replace("<A HREF="+top.topurl+action+"boole.html target=cw onclick=top.savelink("+nst+",'b')>"+ltr+"</A>",ltr);
-       parse();
-       query=query.replace(ltr,fb);
-       actinput++;storia[actinput]=query;numeroazioniannullate=0;//alert (actinput+" "+storia.length);
-       qw.document.write(query);aggform();
-       aggcw();
-       cw.focus();
-       }
-var re1 = /(.*)\?.*/;
-var re2 = /(.*)\/.*/;
-var topurl=document.location+"";
-topurl = topurl.replace(re1,"$1");
-topurl = topurl.replace(re2,"$1");
-//var topurl=document.location.protocol+'//'+document.location.host;
-var action="/getpage?url=";
-//var action="";
-
-
-// UTILITY FUNCTIONS FOR templateambigpdq1.html
-function templateambigpdq1_armageddon()
-       {
-       top.initialize();
-       top.window.open(top.topurl+top.action+"start.html","qw");
-       top.window.open(top.topurl+top.action+"blank.html","cw");
-       top.window.open(top.topurl+top.action+"blank.html","hw");
-       top.window.open(top.topurl+top.action+"blank.html","gw");
-       top.window.open(top.topurl+top.action+"blank.html","sw");
-       }
-
-function templateambigpdq1_resetta()
-       {
-       if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
-               {templateambigpdq1_armageddon();}
-       }
-
-function templateambigpdq1_listauri(document,elenco)
-       {
-       for (i=0;i<elenco.length;i++)
-               {
-               document.write("<input type=checkbox name=uricheck value="+elenco[i]+"> "+elenco[i]+"<br>"); 
-               }
-       }
-
-function templateambigpdq1_invia(document,top,elenco,ident)
-       {
-       vecchiavlds=top.vlds.length;
-       stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
-       stringa=stringa+"&aliases="+top.listaliases;
-       stringa=stringa+"&choices=";
-  var choices = "";
-       top.vlds[top.vlds.length]=ident;
-       for (j=0;j<elenco.length;j++)
-               {
-               if (document.disamb.uricheck[j].checked)
-                       {
-                       top.vlds[top.vlds.length]=document.disamb.uricheck[j].value;
-                       }
-               }
-       top.vlds[top.vlds.length]=";";
-       for (j=0;j<top.vlds.length;j++)
-       {
-           choices=choices+(top.vlds[j]==";"?";":encodeURIComponent(top.vlds[j]))+" ";
-       }
-       choices=choices.substring(0,choices.length-2);
-  top.choices = choices;
-  stringa=stringa+encodeURIComponent(choices);
-       if (top.vlds.length==vecchiavlds){alert("You must select at least one of the options.");}
-       else
-       {
-          window.open(ask_uwobo(stringa),"cw");
-       }
-       } 
-
-  function templateambigpdq1_selezionaCostanti(document,elenco) {
-    for (i=0; i<elenco.length; i++) {
-      if (elenco[i].substring(elenco[i].length-4, elenco[i].length) != ".var") {
-        document.disamb.uricheck[i].checked = true;
-      } else {
-        document.disamb.uricheck[i].checked = false;
-      }
-    }
-  }
-
-
-
-// UTILITY FUNCTIONS FOR templateambigpdq2.html
-function templateambigpdq2_armageddon()
-       {
-       top.initialize();
-       top.window.open(top.topurl+top.action+"start.html","qw");
-       top.window.open(top.topurl+top.action+"blank.html","cw");
-       top.window.open(top.topurl+top.action+"blank.html","hw");
-       top.window.open(top.topurl+top.action+"blank.html","gw");
-       top.window.open(top.topurl+top.action+"blank.html","sw");
-       }
-
-function templateambigpdq2_resetta()
-       {
-       if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
-               {templateambigpdq2_armageddon();}
-       }
-
-function templateambigpdq2_listainterpretazioni(document,elenco,labels)
-       {
-       for (i=0;i<elenco.length;i++)
-               {
-                      document.write("<input type=radio name=interp value="+elenco[i]+"> "+labels[i]+"<br />"); 
-               }
-       }
-
-function templateambigpdq2_invia(document,elenco)
-       {
-       stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
-       stringa=stringa+"&aliases="+encodeURIComponent(top.listaliases)+"&choices="+encodeURIComponent(top.choices)+"&interpretation_choices=";
-  var parsa = "";
-       controllo=parsa.length;
-       for (j=0;j<elenco.length;j++)
-               {
-               if (document.disamb.interp[j].checked)
-                       {
-                       parsa=parsa+encodeURIComponent(elenco[j]);
-
-      // TODO da implementare nella terza fase
-                       //top.aliasglob[top.aliasglob.length]=document.disamb.interp[j].value;
-
-                       //for (k=0;k<top.aliasglob.length;k++){alert(top.aliasglob[k])}
-                       //top.listaliases=top.listaliases+document.disamb.interp[j].value;//in caso di query ulteriori con la stessa lista di alias
-                       }
-                       
-               }
-  top.interpretation_choices = parsa;
-  stringa=stringa+parsa;
-       if (parsa.length!=controllo) 
-               {
-               window.open(ask_uwobo(stringa),"cw");
-               }
-               else {alert("You must choose one option.");}
-       } 
-
-
-
-// UTILITY FUNCTIONS FOR templateambigpdq3.html
-function templateambigpdq3_init(aliases)
-{
-   top.aliasglob = new Array();
-   for (i=0; i<aliases.length; i++) {
-      top.aliasglob[i] = aliases[i];
-   }
-   top.vlds=new Array();
-   top.window.open(top.topurl+top.action+"editorpdq.html", "sw");
-}
-
-// UTILITY FUNCTIONS FOR constraints_choice_template.html
-function get_value_of_checkbox(checkbox)
-  {
-    return (checkbox.checked ? "1" : "0");
-  }
-
-function constraints_choice_template_invia(document,aliases,constr_obj_len,constr_rel_len,constr_sort_len)
-       {
-       stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
-       stringa=stringa+"&aliases="+encodeURIComponent(aliases);
-       stringa=stringa+"&choices="+encodeURIComponent(top.choices);
-       stringa=stringa+"&interpretation_choices="+encodeURIComponent(top.interpretation_choices);
-       stringa=stringa+"&constraints=";
-       for (j=0;j<constr_obj_len;j++)
-        {
-         stringa += document.constraints.constr_obj[j].checked ? "1" : "0";
-      stringa += !document.constraints.obj_depth[j] ||
-                 document.constraints.obj_depth[j].value == "" ? "_" :
-                 document.constraints.obj_depth[j].value;
-      if (j < constr_obj_len - 1) { stringa += "," }
-        }
-  stringa += ":";
-       for (j=0;j<constr_rel_len;j++)
-        {
-         stringa += document.constraints.constr_rel[j].checked ? "1" : "0";
-      stringa += document.constraints.rel_depth[j].value == "" ? "_" :
-                 document.constraints.rel_depth[j].value;
-        if (j < constr_rel_len - 1) { stringa += "," }
-        }
-  stringa += ":";
-       for (j=0;j<constr_sort_len;j++)
-        {
-         stringa += document.constraints.constr_sort[j].checked ? "1" : "0";
-      stringa += document.constraints.sort_depth[j].value == "" ? "_" :
-                 document.constraints.sort_depth[j].value;
-      if (j < constr_sort_len - 1) { stringa += "," }
-        }
-  stringa += ":"+get_value_of_checkbox(document.constraints.only_obj)+
-             ":"+get_value_of_checkbox(document.constraints.only_rel)+
-             ":"+get_value_of_checkbox(document.constraints.only_sort);
-       window.open(ask_uwobo(stringa),"cw");
-       } 
-</SCRIPT>
-</HEAD>
-  <SCRIPT>
-    document.write(' <FRAMESET ROWS="69%,31%"> <FRAMESET COLS="40%,60%"> <FRAMESET ROWS="46%,54%"> <FRAME NAME="qw" SRC="'+topurl+action+'start.html"> <FRAME NAME="sw" SRC="'+topurl+action+'blank.html"> </FRAMESET> <FRAME NAME="cw" SRC="'+topurl+action+'blank.html"> </FRAMESET> <FRAMESET COLS="49%,51%"> <FRAME NAME="gw" SRC="'+topurl+action+'blank.html" onFocus="help(-1)";> <FRAME NAME="hw" SRC="'+topurl+action+'blank.html"> </FRAMESET> </FRAMESET>');
-  </SCRIPT>
-</HTML>
index f1ace2df4f38cd1ec5c7b362ee59bea8059578ca..d72e43fd01f2270831806603aec7f2dad2b7ea67 100644 (file)
 <?xml version="1.0"?>
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ht="http://www.cs.unibo.it/helm/namespaces/helm-theory" xmlns:helm="http://www.cs.unibo.it/helm" xml:lang="en" lang="en">
-<head>
-<title>Moogle</title>
-<style>
-  div.resultsbar {
-    background-color: #e5ecf9;
-    border-top: solid;
-    border-width: thin;
-    border-color: #3366cc;
-  }
-  div.bottombar {
-    background-color: #e5ecf9;
-    border-top: solid;
-    border-bottom: solid;
-    border-width: thin;
-    border-color: #3366cc;
-    text-align: center;
-  }
-  td.left { text-align: left }
-  td.right { text-align: right }
-  b.error { color: red }
-  b.query_kind { font-size: large }
-  body { font-family: sans-serif }
-  span.uri { color: blue; }
-</style>
+  <head>
+  <title>Moogle</title>
+  <style>
+    div.resultsbar {
+      background-color: #e5ecf9;
+      border-top: solid;
+      border-width: thin;
+      border-color: #3366cc;
+    }
+    div.bottombar {
+      background-color: #e5ecf9;
+      border-top: solid;
+      border-bottom: solid;
+      border-width: thin;
+      border-color: #3366cc;
+      text-align: center;
+    }
+    table.interp {
+      border-collapse: collapse;
+      border-top: solid;
+      border-width: 1pt;
+    }
+    tr.interp {
+      border-bottom: solid;
+      border-width: 1pt;
+    }
+    td.left { text-align: left }
+    td.right { text-align: right }
+    b.error { color: red }
+    b.query_kind { font-size: large }
+    body {
+      font-family: sans-serif;
+      background-color: #ffffff;
+    }
+    span.uri { color: blue; }
+    span.invisible { color: #e5ecf9; }
+  </style>
 </head>
-<body bgcolor="#ffffff">
-<helm:uwobo_form>
-  <helm:hidden_params />
-  <input type="hidden" name="advanced" value="@ADVANCED@"/>
-  <input type="hidden" name="keys" value="S,T1,T2,L,RT,E"/>
-  <table cellspacing="0" cellpadding="0">
-  <tr valign="middle">
-  <td><img src="@SEARCH_ENGINE_URL@/getpage?url=moogle_small.png" alt="moogle" /></td>
-  <td>&#xA0;&#xA0;</td>
-  <td align="center">
-  <input maxLength="256" size="45" name="param.expression" value="@EXPRESSION@" />
-  </td>
-  <td>
-  <input type="submit" value="locate" name="param.action" />
-  <input type="submit" value="hint" name="param.action" />
-  <input type="submit" value="match" name="param.action" />
-  <input type="submit" value="elim" name="param.action" />
-  </td>
-  <td>&#xA0;&#xA0;&#xA0;</td>
-  <td>
-   <font size="-2">
-    <a href="@SEARCH_ENGINE_URL@/getpage?url=moogle_help.html">Help</a><br />
-    <a href="@SEARCH_ENGINE_URL@/getpage?url=moogle_syntax.html">Input Syntax</a>
-   </font>
-  </td>
-  </tr>
-  <br />
-<!--
-  <tr>
-   <td colspan="2" />
-   <td align="center">
-    <font size="-1">
-    <input type="radio" name="param.advanced" value="no" @SIMPLE_CHECKED@ />
-    <label>Simple search</label>
-    <input type="radio" name="param.advanced" value="yes" @ADVANCED_CHECKED@ />
-    <label>Advanced search</label>
-    </font>
-   </td>
-   <td colspan="2" />
-   </tr>
--->
-  </table>
-</helm:uwobo_form>
-<font size="-1">
-<!-- MOZILLA SEARCH PLUGIN: BEGIN LIST -->
- <div class='resultsbar'>
-  <table width='100%%'>
-   <tr>
-    <td class='left'><b class='query_kind'>@QUERY_KIND@</b></td>
-    <td class='right'>@QUERY_SUMMARY@</td>
-   </tr>
-  </table>
- </div>
- <br />
- <div>
-@RESULTS@
- </div>
- <!-- MOZILLA SEARCH PLUGIN: END LIST -->
-</font>
-<font size="-1">
-  <div class='bottombar'>
+  <body>
+    <helm:uwobo_form>
+    <helm:hidden_params/>
+    <input type="hidden" name="advanced" value="@ADVANCED@"/>
+    <input type="hidden" name="keys" value="S,T1,T2,L,RT,E"/>
+    <table cellspacing="0" cellpadding="0">
+      <tr valign="middle">
+       <td><img src="@SEARCH_ENGINE_URL@/getpage?url=moogle_small.png" alt="moogle"/></td>
+       <td>&#xA0;&#xA0;</td>
+       <td align="center">
+         <input maxLength="256" size="45" name="param.expression" value="@EXPRESSION@"/>
+       </td>
+       <td>
+         <input type="submit" value="locate" name="param.action"/>
+         <input type="submit" value="hint" name="param.action"/>
+         <input type="submit" value="match" name="param.action"/>
+         <input type="submit" value="elim" name="param.action"/>
+       </td>
+       <td>&#xA0;&#xA0;&#xA0;</td>
+       <td>
+         <font size="-2">
+           <a href="@SEARCH_ENGINE_URL@/getpage?url=moogle_help.html">Help</a><br/>
+           <a href="@SEARCH_ENGINE_URL@/getpage?url=moogle_syntax.html">Input Syntax</a>
+         </font>
+       </td>
+      </tr>
+      <br/>
+      <!--
+      <tr>
+       <td colspan="2" />
+       <td align="center">
+         <font size="-1">
+           <input type="radio" name="param.advanced" value="no" @SIMPLE_CHECKED@ />
+           <label>Simple search</label>
+           <input type="radio" name="param.advanced" value="yes" @ADVANCED_CHECKED@ />
+           <label>Advanced search</label>
+         </font>
+       </td>
+       <td colspan="2" />
+      </tr>
+      -->
+    </table>
+  </helm:uwobo_form>
+    <div class="resultsbar">
+    <table width="100%%">
+      <tr>
+       <td class="left"><b class="query_kind">@QUERY_KIND@</b></td>
+       <td class="right">@QUERY_SUMMARY@</td>
+      </tr>
+    </table>
+  </div><br/>
+    <!-- MOZILLA SEARCH PLUGIN: BEGIN LIST -->
+    <div>
+      @RESULTS@
+    </div>
+    <!-- MOZILLA SEARCH PLUGIN: END LIST -->
+    <div class="bottombar">
     Page: @PREV_LINK@ <b>@PAGE@/@PAGES@</b> @NEXT_LINK@
   </div>
-</font>
-</body>
+  </body>
 </html>
-
diff --git a/helm/searchEngine/html/moogle.html.src b/helm/searchEngine/html/moogle.html.src
new file mode 100644 (file)
index 0000000..eca23d3
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<html
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:ht="http://www.cs.unibo.it/helm/namespaces/helm-theory"
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  xml:lang="en"
+  lang="en"
+>
+  <helm:include href="moogle_header.html.src" />
+  <body>
+    <helm:include href="moogle_form.html.src" />
+    <helm:include href="moogle_querybar.html.src" />
+    <!-- MOZILLA SEARCH PLUGIN: BEGIN LIST -->
+    <div>
+      @RESULTS@
+    </div>
+    <!-- MOZILLA SEARCH PLUGIN: END LIST -->
+    <helm:include href="moogle_trailer.html.src" />
+  </body>
+</html>
+
diff --git a/helm/searchEngine/html/moogle_chat.html b/helm/searchEngine/html/moogle_chat.html
deleted file mode 100644 (file)
index 627c625..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <title></title>
-  </head>
-
-  <body>
-    <h1></h1>
-
-
-
-    <hr>
-    <address><a href="mailto:asperti@">Andrea Asperti</a></address>
-<!-- Created: Fri Jun 11 09:12:10 CEST 2004 -->
-<!-- hhmts start -->
-Last modified: Fri Jun 11 12:47:42 CEST 2004
-<!-- hhmts end -->
-  </body>
-</html>
diff --git a/helm/searchEngine/html/moogle_chat.html.src b/helm/searchEngine/html/moogle_chat.html.src
new file mode 100644 (file)
index 0000000..1e610b7
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<html
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:ht="http://www.cs.unibo.it/helm/namespaces/helm-theory"
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  xml:lang="en"
+  lang="en"
+>
+  <helm:include href="moogle_header.html.src" />
+  <body>
+    <helm:include href="moogle_form.html.src" />
+    <helm:include href="moogle_querybar.html.src" />
+    <div>
+      <p>
+       <b>Ambiguous input:</b> <kbd>@EXPRESSION@</kbd>
+      </p>
+      <p>
+       Please choose one of the following interpretations:
+      </p>
+      <p>
+       <helm:uwobo_form>
+         <helm:hidden_params />
+         <input type="hidden" name="keys" value="S,T1,T2,L,RT,E"/>
+         <input type="hidden" name="param.expression" value="@EXPRESSION@"/>
+         <input type="hidden" name="param.action" value="@ACTION@"/>
+         <input type="hidden" name="param.advanced" value="@ADVANCED@"/>
+         <input type="hidden" name="param.choices" value="@CURRENT_CHOICES@"/>
+         @INTERPRETATIONS@
+         <br />
+         <input type="submit" value="Choose" />
+       </helm:uwobo_form>
+      </p>
+    </div>
+  <div class='bottombar'>
+    <span class="invisible">moogle rules</span>
+  </div>
+  </body>
+</html>
+
diff --git a/helm/searchEngine/html/moogle_form.html.src b/helm/searchEngine/html/moogle_form.html.src
new file mode 100644 (file)
index 0000000..d98eebf
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<helm:content
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  xmlns="http://www.w3.org/1999/xhtml"
+>
+  <helm:uwobo_form>
+    <helm:hidden_params />
+    <input type="hidden" name="advanced" value="@ADVANCED@"/>
+    <input type="hidden" name="keys" value="S,T1,T2,L,RT,E"/>
+    <table cellspacing="0" cellpadding="0">
+      <tr valign="middle">
+       <td><img src="@SEARCH_ENGINE_URL@/getpage?url=moogle_small.png" alt="moogle" /></td>
+       <td>&#xA0;&#xA0;</td>
+       <td align="center">
+         <input maxLength="256" size="45" name="param.expression" value="@EXPRESSION@" />
+       </td>
+       <td>
+         <input type="submit" value="locate" name="param.action" />
+         <input type="submit" value="hint" name="param.action" />
+         <input type="submit" value="match" name="param.action" />
+         <input type="submit" value="elim" name="param.action" />
+       </td>
+       <td>&#xA0;&#xA0;&#xA0;</td>
+       <td>
+         <font size="-2">
+           <a href="@SEARCH_ENGINE_URL@/getpage?url=moogle_help.html">Help</a><br />
+           <a href="@SEARCH_ENGINE_URL@/getpage?url=moogle_syntax.html">Input Syntax</a>
+         </font>
+       </td>
+      </tr>
+      <br />
+      <!--
+      <tr>
+       <td colspan="2" />
+       <td align="center">
+         <font size="-1">
+           <input type="radio" name="param.advanced" value="no" @SIMPLE_CHECKED@ />
+           <label>Simple search</label>
+           <input type="radio" name="param.advanced" value="yes" @ADVANCED_CHECKED@ />
+           <label>Advanced search</label>
+         </font>
+       </td>
+       <td colspan="2" />
+      </tr>
+      -->
+    </table>
+  </helm:uwobo_form>
+</helm:content>
diff --git a/helm/searchEngine/html/moogle_header.html.src b/helm/searchEngine/html/moogle_header.html.src
new file mode 100644 (file)
index 0000000..2100ca2
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<helm:content
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  xmlns="http://www.w3.org/1999/xhtml"
+>
+<head>
+  <title>Moogle</title>
+  <style>
+    div.resultsbar {
+      background-color: #e5ecf9;
+      border-top: solid;
+      border-width: thin;
+      border-color: #3366cc;
+    }
+    div.bottombar {
+      background-color: #e5ecf9;
+      border-top: solid;
+      border-bottom: solid;
+      border-width: thin;
+      border-color: #3366cc;
+      text-align: center;
+    }
+    table.interp {
+      border-collapse: collapse;
+      border-top: solid;
+      border-width: 1pt;
+    }
+    tr.interp {
+      border-bottom: solid;
+      border-width: 1pt;
+    }
+    td.left { text-align: left }
+    td.right { text-align: right }
+    b.error { color: red }
+    b.query_kind { font-size: large }
+    body {
+      font-family: sans-serif;
+      background-color: #ffffff;
+    }
+    span.uri { color: blue; }
+    span.invisible { color: #e5ecf9; }
+  </style>
+</head>
+</helm:content>
diff --git a/helm/searchEngine/html/moogle_querybar.html.src b/helm/searchEngine/html/moogle_querybar.html.src
new file mode 100644 (file)
index 0000000..7a5110a
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<helm:content
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  xmlns="http://www.w3.org/1999/xhtml"
+>
+  <div class='resultsbar'>
+    <table width='100%%'>
+      <tr>
+       <td class='left'><b class='query_kind'>@QUERY_KIND@</b></td>
+       <td class='right'>@QUERY_SUMMARY@</td>
+      </tr>
+    </table>
+  </div>
+  <br />
+</helm:content>
diff --git a/helm/searchEngine/html/moogle_trailer.html.src b/helm/searchEngine/html/moogle_trailer.html.src
new file mode 100644 (file)
index 0000000..5f067c7
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<helm:content
+  xmlns:helm="http://www.cs.unibo.it/helm"
+  xmlns="http://www.w3.org/1999/xhtml"
+>
+  <div class='bottombar'>
+    Page: @PREV_LINK@ <b>@PAGE@/@PAGES@</b> @NEXT_LINK@
+  </div>
+</helm:content>