1 function updateMode(i, s)
4 var mode_list = mode.split(",");
8 for (j = 0; j < mode_list.length; j++) {
10 else res += mode_list[j];
11 if (j < mode_list.length - 1) res += ",";
17 function updateOutput(output,format)
19 var theoryuri = top.theoryuri;
20 var cicuri = top.cicuri;
22 var topurl = top.topurl;
23 var processorURL = top.processorURL;
24 var getterURL = top.getterURL;
25 var proofcheckerURL = top.proofcheckerURL;
26 var draw_graphURL = top.draw_graphURL;
27 var uri_set_queueURL = top.uri_set_queueURL;
28 var mode_list = mode.split(",");
29 var new_mode = output.options[output.selectedIndex].value;
30 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=";
32 if (new_mode != mode_list[0]) {
33 updateMode(0, new_mode);
34 if (new_mode == "raw") updateMode(2, format.options[format.selectedIndex].value);
35 else updateMode(1, format.options[format.selectedIndex].value);
38 top.processorURL + 'apply' +
40 '¶m.topurl=' + topurl +
42 escape(top.topurl + '/html/library/control.html' + dest + top.mode);
48 function updateFormat(format)
51 var mode_list = mode.split(",");
53 if (mode_list[0] == "raw") {
54 updateMode(1, format.options[format.selectedIndex].value);
56 updateMode(2, format.options[format.selectedIndex].value);
62 function updateNatural(checkbox)
64 if (checkbox.checked) updateMode(3, "yes");
65 else updateMode(3, "no");
69 function updateAnnotations(checkbox)
71 if (checkbox.checked) updateMode(4, "yes");
72 else updateMode(4, "no");
76 function updateCompressed(checkbox)
78 if (checkbox.checked) updateMode(5, "gz");
79 else updateMode(5, "normal");
83 function updateDTDPatched(checkbox)
85 if (checkbox.checked) updateMode(6, "yes");
86 else updateMode(6, "no");
90 function refreshReload()
94 "&cicuri=" + top.cicuri +
95 "&theoryuri=" + top.theoryuri +
96 "&processorURL=" + top.processorURL +
97 "&getterURL=" + top.getterURL +
98 "&proofcheckerURL=" + top.proofcheckerURL +
99 "&draw_graphURL=" + top.draw_graphURL +
100 "&uri_set_queueURL=" + top.uri_set_queueURL +
101 "&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL;
104 top.processorURL + 'apply' +
106 '¶m.topurl=' + top.topurl +
108 escape(top.topurl + '/html/library/index.html' + search);
110 top.frames[0].document.links[0].href = href;
111 top.frames[0].document.links[1].href =
112 top.topurl + '/html/index.html' + search;
117 function refreshcicHeader(headerURL)
119 top.cicheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.cicuri;
123 function refreshtheoryHeader(headerURL)
125 top.theoryheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.theoryuri;
129 function getCICMathMLKeys()
131 return escape("d_c,C1,G,C2,L");
134 function getTheoryKeys()
136 return escape("T1,T2,L,E");
139 function getEmbedKeys()
141 return escape("d_c,TC1,HC2,L");
144 function getCICHTMLKeys()
146 return escape("d_c,C1,HC2,L");
149 function makeURL(type,uri,cicflags,typesflags)
152 var processorURL = top.processorURL;
153 var getterURL = top.getterURL;
154 var proofcheckerURL = top.proofcheckerURL;
155 var draw_graphURL = top.draw_graphURL;
156 var uri_set_queueURL = top.uri_set_queueURL;
157 var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
158 var mode_list = mode.split(",");
163 var interfaceURL = top.topurl + "/html/cic/index.html";
164 var thinterfaceURL = top.topurl + "/html/theory/index.html";
166 var output = mode_list[0];
168 if (output == "raw") format = mode_list[1];
169 else format = mode_list[2];
171 if (output == "raw") {
174 if (format == "types") ext = ".types"
175 else if (format == "ann") ext = ".ann"
176 else if (format == "fwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/forward//"
177 else if (format == "bwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//";
178 url = getterURL + "getxml?uri=" + rdfprefix + uri + ext + "&format=" +
179 mode_list[5] + "&patch_dtd=" + mode_list[6];
181 if (format == "html" && type == "cic") {
182 keys = getCICHTMLKeys() +
183 "¶m.processorURL=" + escape(processorURL) +
184 "¶m.getterURL=" + escape(getterURL) +
185 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
186 "¶m.draw_graphURL=" + escape(draw_graphURL) +
187 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
188 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
189 "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
190 "&prop.encoding=iso-8859-1" +
191 "&prop.media-type=text/html" +
192 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
193 "¶m.encoding=iso-8859-1" +
194 "¶m.media-type=text/html" +
195 "¶m.keys=" + getCICHTMLKeys() +
196 "¶m.interfaceURL=" + escape(interfaceURL);
197 } else if (format == "html" && type == "theory") {
198 keys = getTheoryKeys()+
199 "¶m.processorURL=" + escape(processorURL) +
200 "¶m.getterURL=" + escape(getterURL) +
201 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
202 "¶m.draw_graphURL=" + escape(draw_graphURL) +
203 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
204 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
205 "¶m.keys=" + getCICHTMLKeys() +
206 "¶m.thkeys=" + getTheoryKeys() +
207 "¶m.embedkeys=" + getEmbedKeys() +
208 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
209 "¶m.encoding=iso-8859-1" +
210 "¶m.thencoding=iso-8859-1" +
211 "¶m.media-type=text/html" +
212 "¶m.thmedia-type=text/html" +
213 "¶m.interfaceURL=" + escape(interfaceURL) +
214 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
215 } else if (format == "mml_cont" && type == "cic") {
216 keys = escape("d_c,C1")+
217 "&prop.doctype-public="+
219 "&prop.media-type=text/xml" +
220 "¶m.doctype-public=" +
222 "¶m.media-type=text/xml";
223 } else if (format == "mml_cont" && type == "theory") {
224 keys = escape("T1,L,E")+
225 "¶m.keys=" + escape("d_c,C1") +
226 "¶m.thkeys=T1,L,E" +
227 "¶m.embedkeys=" + escape("d_c,TC1") +
229 "¶m.processorURL=" + escape(processorURL) +
230 "¶m.getterURL=" + escape(getterURL) +
231 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
232 "¶m.draw_graphURL=" + escape(draw_graphURL) +
233 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
234 "¶m.doctype-public=" +
236 "¶m.thencoding=iso-8859-1" +
237 "¶m.media-type=text/xml" +
238 "¶m.thmedia-type=text/html" +
239 "¶m.interfaceURL=" + escape(interfaceURL) +
240 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
241 } else if (format == "mml_pres" && type == "cic") {
242 keys = getCICMathMLKeys()+
243 "¶m.processorURL=" + escape(processorURL) +
244 "¶m.getterURL=" + escape(getterURL) +
245 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
246 "¶m.draw_graphURL=" + escape(draw_graphURL) +
247 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
248 "&prop.doctype-public="+
250 "&prop.media-type=text/xml" +
251 "¶m.doctype-public=" +
253 "¶m.media-type=text/xml" +
254 "¶m.keys=" + getCICMathMLKeys() +
255 "¶m.interfaceURL=" + escape(interfaceURL);
256 } else if (format == "mml_pres" && type == "theory") {
257 keys = getTheoryKeys()+
258 "¶m.keys=" + getCICMathMLKeys() +
259 "¶m.thkeys=" + getTheoryKeys() +
260 "¶m.embedkeys=" + escape("d_c,TC1,G,C2,L") +
261 "¶m.processorURL=" + escape(processorURL) +
262 "¶m.getterURL=" + escape(getterURL) +
263 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
264 "¶m.draw_graphURL=" + escape(draw_graphURL) +
265 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
266 "¶m.doctype-public=" +
268 "¶m.thencoding=iso-8859-1" +
269 "¶m.media-type=text/xml" +
270 "¶m.thmedia-type=text/html" +
271 "¶m.interfaceURL=" + escape(interfaceURL) +
272 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
275 var naturalLanguage = typesflags.toLowerCase();
276 if (typesflags != "NO" || type == "theory") {
277 naturalLanguage = mode_list[3];
279 var annotations = cicflags.toLowerCase();
280 if (cicflags != "NO" || type == "theory") {
281 annotations = mode_list[4];
283 url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations + "¶m.topurl=" + top.topurl;
288 else if (type == "cic")
289 return interfaceURL + "?url=" + escape(url);
290 else if (type == "theory")
291 return thinterfaceURL + "?url=" + escape(url)