3 <SCRIPT language="Javascript">
7 for (num=0; num<top.norvars; num++)
9 document.write("<OPTION value="+top.rvars[num]+">"+top.rvars[num]);
14 for (num=0; num<top.nosvars; num++)
16 document.write("<OPTION value="+top.svars[num]+">"+top.svars[num]);
21 for (num=0; num<top.novvars; num++)
23 document.write("<OPTION value="+top.vvars[num]+">"+top.vvars[num]);
28 with (document.form1) {
29 if (selopt[0].checked)
30 alert ("Turns a list of strings which cannot have attributes (the [val]) in a list of strings which can have them, but initially has none (a [set]).");
31 if (selopt[1].checked)
32 alert ("Taken a list of posix regular expressions, 'pattern [val]' searches the HELM library for all the URIs which match with at least one of those and returns a [set] representing them.");
33 if (selopt[2].checked)
34 alert ("A [svar] represents a list of URIs with attributes.");
35 if (selopt[3].checked)
36 alert ("A [rvar] is a single URI with attributes.");
37 if (selopt[4].checked)
38 alert ("Parenthesis are employed to force precedence between operators.");
39 if (selopt[5].checked)
40 alert ("The [path] you must enter represents a relation; this production returns a [set] composed by the union of all the URIs which match the chosen relation in the [val] you will enter afterwards, without attributes. If you select 'inverse', you'll obtain a list of all the URIs for which the [val] matches the chosen relation, 'sub' and 'super' modify the result depending on the chosen relation and the last input box allows you to add attributes to the result.");
41 if (selopt[6].checked)
42 alert ("This production returns a [set] composed by all the URIs in the given [set] which match the condition in the given [boole].");
43 if (selopt[7].checked)
44 alert ("'Union' returns a [set] which is the union of the two given [set]; should an URI be present in each [set] with different attributes, it will be included in the result only once with all the attributes.\n'Intersect' returns a [set] which contains the cartesian product of the URIs listed in each given [set].\n'Diff' returns a [set] which contains the URIs found in the first given [set] but not in the second. Attributes are ignored.");
45 if (selopt[8].checked)
46 alert ("Allows you to assign a value to a [svar]");
47 if (selopt[9].checked)
48 alert ("Allows you to assign a value to a [vvar]");
54 with (document.form1) {
55 inputok=0;voidfield=0;top.wrong=0;
56 if (selopt[0].checked) {
57 top.stadd="ref [val]";
60 if (selopt[1].checked) {
61 top.stadd="pattern [val]";
64 if (selopt[2].checked) {
66 if (set1.value!="") {inputok=1} else voidfield=1;
68 if (selopt[3].checked) {
70 if (set2.value!="") {inputok=1} else voidfield=1;
72 if (selopt[4].checked) {
76 if (selopt[5].checked) {
77 if (set5.value.charAt(set5.value.length-1)==","){set5.value=set5.value.substring(0,set5.value.length-1)}
78 if (set5.value.length<7) {set5.value=""};
79 set4.value=top.tpa(set4.value);
80 top.stadd="relation "+set25.value+" "+set3.value+" "+set4.value+" [val] "+set5.value;
81 top.gramcheck("qp",set4.value);
82 //alert(set5.value.charAt(set5.value.length-1));
83 top.stadd=top.tpa(top.stadd);
84 //while (top.stadd.indexOf("<")>-1)
85 //{top.stadd=top.stadd.replace("<","<");}
87 {top.gramcheck("vlist",set5.value);}
90 if (selopt[6].checked) {
91 top.stadd="select @"+set6.value+" in [set] where [boole]";
92 top.gramcheck("id",set6.value);
93 if ((set6.value!="") && (inputok==1))
95 top.rvars[top.norvars]="@"+set6.value;
99 if (selopt[7].checked) {
100 top.stadd="[set] "+set7.value+" [set]";
103 if (selopt[8].checked) {
104 top.stadd="let %"+set8.value+" be [set] in [set]";
105 top.gramcheck("id",set8.value);
106 if ((set8.value!="") && (inputok==1))
108 top.svars[top.nosvars]="%"+set8.value;
112 if (selopt[9].checked) {
113 top.stadd="let $"+set9.value+" be [val] in [set]";
114 top.gramcheck("id",set9.value);
115 if ((set9.value!="") && (inputok==1))
117 top.vvars1[top.novvars1]="$"+set9.value;
121 if (selopt[10].checked) {
122 set10.value=top.tpa(set10.value);
123 top.stadd=set10.value;
124 if (set10.value!="") {inputok=1} else voidfield=1;
127 if (top.stadd!="" && inputok==1) {top.aggq()}
128 else if (voidfield==1) alert("You left at least one field unfilled");
133 <h1> <SCRIPT language="Javascript">document.write(top.ltr) </SCRIPT>
134 <input type="button" value="<-" onmouseOver="top.help(-8)" onclick="top.annulla()">
135 <input type="button" value="->" onmouseOver="top.help(-81)" onclick="top.ripristina()"></h1>
136 <h2> Select one of the following: </h2>
137 <form name="form1" action="Javascript:choice();" method="get">
138 <input type="radio" name="selopt"> ref [val] <br>
139 <input type="radio" name="selopt"> pattern [val] <br>
140 <input type="radio" name="selopt"> <select name="set1" type=text onFocus="selopt[2].checked=true;top.help(6)">
141 <SCRIPT language=Javascript> listsvars(); </SCRIPT>
144 <input type="radio" name="selopt"> <select name="set2" type=text onFocus="selopt[3].checked=true;top.help(4)">
145 <SCRIPT language=Javascript> listrvars(); </SCRIPT>
148 <input type="radio" name="selopt"> ( [set] ) <br>
149 <input type="radio" name="selopt"> relation
150 <select name="set25" onFocus="selopt[5].checked=true">
151 <OPTION selected value="">
152 <OPTION value=inverse> inverse
154 <select name="set3" onFocus="selopt[5].checked=true">
155 <OPTION selected value="">
156 <OPTION value=sub> sub
157 <OPTION value=super> super
159 <input name="set4" type=text size=15 value="""" onFocus="selopt[5].checked=true;top.help(5)">
160 [val] <input name="set5" type=text size=20 onFocus="selopt[5].checked=true;top.help(2);if (this.value=='') this.value='attr $';">
162 <input type="radio" name="selopt"> select @ <input name="set6" type=text onFocus="selopt[6].checked=true;top.help(3)">
163 in [set] where [boole] <br> <input type="radio" name="selopt"> [set]
164 <select name="set7" onFocus="selopt[7].checked=true">
165 <OPTION value=union> union
166 <OPTION value=intersect> intersect
167 <OPTION value=diff> diff
170 <input type="radio" name="selopt"> let %<input name="set8" type=text onFocus="selopt[8].checked=true;top.help(3)"> be [set] in [set] <br>
171 <input type="radio" name="selopt"> let $<input name="set9" type=text onFocus="selopt[9].checked=true;top.help(3)"> be [val] in [set] <br>
172 <input type="radio" name="selopt"> <input name="set10" type=text
173 onFocus="selopt[10].checked=true;top.help(1)"> <br>
174 <input type="submit" value="compose"><input type="button" value="get help" onclick="help()">
175 <!--input type="button" value="compose" onclick="choice()"><!--input type="button" value="get help" onclick="help()">