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 getCICProofTreeXHTMLMathMLKeys()
151 return escape("HAT,G,HAO,L");
154 function makeURL(type,uri,cicflags,typesflags)
157 var processorURL = top.processorURL;
158 var getterURL = top.getterURL;
159 var proofcheckerURL = top.proofcheckerURL;
160 var draw_graphURL = top.draw_graphURL;
161 var uri_set_queueURL = top.uri_set_queueURL;
162 var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
163 var mode_list = mode.split(",");
168 var interfaceURL = top.topurl + "/html/cic/index.html";
169 var thinterfaceURL = top.topurl + "/html/theory/index.html";
171 var output = mode_list[0];
173 if (output == "raw") format = mode_list[1];
174 else format = mode_list[2];
176 if (output == "raw") {
179 if (format == "types") ext = ".types"
180 else if (format == "ann") ext = ".ann"
181 else if (format == "fwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/forward//"
182 else if (format == "bwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//";
183 url = getterURL + "getxml?uri=" + rdfprefix + uri + ext + "&format=" +
184 mode_list[5] + "&patch_dtd=" + mode_list[6];
186 var uri_len = uri.length;
187 if (format == "html" && type == "cic" && uri.substring(uri.length - 10, uri.length) == "proof_tree") {
188 keys = getCICProofTreeXHTMLMathMLKeys() +
189 "¶m.processorURL=" + escape(processorURL) +
190 "¶m.getterURL=" + escape(getterURL) +
191 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
192 "¶m.draw_graphURL=" + escape(draw_graphURL) +
193 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
194 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
195 "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN")+
196 "&prop.doctype-system="+escape("http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd")+
197 "&prop.encoding=iso-8859-1" +
198 "&prop.media-type=text/xml" +
200 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
201 "¶m.encoding=iso-8859-1" +
202 "¶m.media-type=text/html" +
203 "¶m.keys=" + getCICHTMLKeys() +
204 "¶m.interfaceURL=" + escape(interfaceURL) +
205 "¶m.framewidth=150";
206 } else if (format == "html" && type == "cic") {
207 keys = getCICHTMLKeys() +
208 "¶m.processorURL=" + escape(processorURL) +
209 "¶m.getterURL=" + escape(getterURL) +
210 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
211 "¶m.draw_graphURL=" + escape(draw_graphURL) +
212 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
213 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
214 "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
215 "&prop.encoding=iso-8859-1" +
216 "&prop.media-type=text/html" +
217 "&prop.method=html" +
218 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
219 "¶m.encoding=iso-8859-1" +
220 "¶m.media-type=text/html" +
221 "¶m.keys=" + getCICHTMLKeys() +
222 "¶m.interfaceURL=" + escape(interfaceURL);
223 } else if (format == "html" && type == "theory") {
224 keys = getTheoryKeys()+
225 "¶m.processorURL=" + escape(processorURL) +
226 "¶m.getterURL=" + escape(getterURL) +
227 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
228 "¶m.draw_graphURL=" + escape(draw_graphURL) +
229 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
230 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
231 "¶m.keys=" + getCICHTMLKeys() +
232 "¶m.thkeys=" + getTheoryKeys() +
233 "¶m.embedkeys=" + getEmbedKeys() +
234 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
235 "¶m.encoding=iso-8859-1" +
236 "¶m.thencoding=iso-8859-1" +
237 "¶m.media-type=text/html" +
238 "¶m.thmedia-type=text/html" +
239 "¶m.interfaceURL=" + escape(interfaceURL) +
240 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
241 } else if (format == "mml_cont" && type == "cic") {
242 keys = escape("d_c,C1")+
243 "¶m.processorURL=" + escape(processorURL) +
244 "¶m.getterURL=" + escape(getterURL) +
245 "&prop.doctype-public="+
246 //"&prop.encoding=" +
247 "&prop.media-type=text/xml" +
248 "¶m.doctype-public=" +
250 "¶m.media-type=text/xml";
251 } else if (format == "mml_cont" && type == "theory") {
252 keys = escape("T1,L,E")+
253 "¶m.processorURL=" + escape(processorURL) +
254 "¶m.getterURL=" + escape(getterURL) +
255 "¶m.keys=" + escape("d_c,C1") +
256 "¶m.thkeys=T1,L,E" +
257 "¶m.embedkeys=" + escape("d_c,TC1") +
259 "¶m.processorURL=" + escape(processorURL) +
260 "¶m.getterURL=" + escape(getterURL) +
261 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
262 "¶m.draw_graphURL=" + escape(draw_graphURL) +
263 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
264 "¶m.doctype-public=" +
266 "¶m.thencoding=iso-8859-1" +
267 "¶m.media-type=text/xml" +
268 "¶m.thmedia-type=text/html" +
269 "¶m.interfaceURL=" + escape(interfaceURL) +
270 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
271 } else if (format == "mml_pres" && type == "cic") {
272 keys = getCICMathMLKeys()+
273 "¶m.processorURL=" + escape(processorURL) +
274 "¶m.getterURL=" + escape(getterURL) +
275 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
276 "¶m.draw_graphURL=" + escape(draw_graphURL) +
277 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
278 "&prop.doctype-public="+
279 //"&prop.encoding=" +
280 "&prop.media-type=text/xml" +
281 "¶m.doctype-public=" +
283 "¶m.media-type=text/xml" +
284 "¶m.keys=" + getCICMathMLKeys() +
285 "¶m.interfaceURL=" + escape(interfaceURL);
286 } else if (format == "mml_pres" && type == "theory") {
287 keys = getTheoryKeys()+
288 "¶m.keys=" + getCICMathMLKeys() +
289 "¶m.thkeys=" + getTheoryKeys() +
290 "¶m.embedkeys=" + escape("d_c,TC1,G,C2,L") +
291 "¶m.processorURL=" + escape(processorURL) +
292 "¶m.getterURL=" + escape(getterURL) +
293 "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
294 "¶m.draw_graphURL=" + escape(draw_graphURL) +
295 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
296 "¶m.doctype-public=" +
298 "¶m.thencoding=iso-8859-1" +
299 "¶m.media-type=text/xml" +
300 "¶m.thmedia-type=text/html" +
301 "¶m.interfaceURL=" + escape(interfaceURL) +
302 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
305 var naturalLanguage = typesflags.toLowerCase();
306 if (typesflags != "NO" || type == "theory") {
307 naturalLanguage = mode_list[3];
309 var annotations = cicflags.toLowerCase();
310 if (cicflags != "NO" || type == "theory") {
311 annotations = mode_list[4];
313 url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations + "¶m.topurl=" + top.topurl;
318 else if (type == "cic")
319 return interfaceURL + "?url=" + escape(url);
320 else if (type == "theory")
321 return thinterfaceURL + "?url=" + escape(url)