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 draw_graphURL = top.draw_graphURL;
26 var uri_set_queueURL = top.uri_set_queueURL;
27 var mode_list = mode.split(",");
28 var new_mode = output.options[output.selectedIndex].value;
29 var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&draw_graphURL=" + draw_graphURL + "&uri_set_queueURL=" + uri_set_queueURL + "&mode=";
31 if (new_mode != mode_list[0]) {
32 updateMode(0, new_mode);
33 if (new_mode == "raw") updateMode(2, format.options[format.selectedIndex].value);
34 else updateMode(1, format.options[format.selectedIndex].value);
37 top.processorURL + 'apply' +
39 '¶m.topurl=' + topurl +
41 escape(top.topurl + '/html/library/control.html' + dest + top.mode);
47 function updateFormat(format)
50 var mode_list = mode.split(",");
52 if (mode_list[0] == "raw") {
53 updateMode(1, format.options[format.selectedIndex].value);
55 updateMode(2, format.options[format.selectedIndex].value);
61 function updateNatural(checkbox)
63 if (checkbox.checked) updateMode(3, "yes");
64 else updateMode(3, "no");
68 function updateAnnotations(checkbox)
70 if (checkbox.checked) updateMode(4, "yes");
71 else updateMode(4, "no");
75 function updateCompressed(checkbox)
77 if (checkbox.checked) updateMode(5, "gz");
78 else updateMode(5, "normal");
82 function updateDTDPatched(checkbox)
84 if (checkbox.checked) updateMode(6, "yes");
85 else updateMode(6, "no");
89 function refreshReload()
93 "&cicuri=" + top.cicuri +
94 "&theoryuri=" + top.theoryuri +
95 "&processorURL=" + top.processorURL +
96 "&getterURL=" + top.getterURL +
97 "&draw_graphURL=" + top.draw_graphURL +
98 "&uri_set_queueURL=" + top.uri_set_queueURL +
99 "&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL;
102 top.processorURL + 'apply' +
104 '¶m.topurl=' + top.topurl +
106 escape(top.topurl + '/html/library/index.html' + search);
108 top.frames[0].document.links[0].href = href;
109 top.frames[0].document.links[1].href =
110 top.topurl + '/html/index.html' + search;
115 function refreshcicHeader(headerURL)
117 top.cicheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.cicuri;
121 function refreshtheoryHeader(headerURL)
123 top.theoryheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.theoryuri;
127 function getCICMathMLKeys()
129 return escape("d_c,C1,G,C2,L");
132 function getTheoryKeys()
134 return escape("T1,T2,L,E");
137 function getEmbedKeys()
139 return escape("d_c,TC1,HC2,L");
142 function getCICHTMLKeys()
144 return escape("d_c,C1,HC2,L");
147 function makeURL(type,uri,cicflags,typesflags)
150 var processorURL = top.processorURL;
151 var getterURL = top.getterURL;
152 var draw_graphURL = top.draw_graphURL;
153 var uri_set_queueURL = top.uri_set_queueURL;
154 var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
155 var mode_list = mode.split(",");
160 var interfaceURL = top.topurl + "/html/cic/index.html";
161 var thinterfaceURL = top.topurl + "/html/theory/index.html";
163 var output = mode_list[0];
165 if (output == "raw") format = mode_list[1];
166 else format = mode_list[2];
168 if (output == "raw") {
171 if (format == "types") ext = ".types"
172 else if (format == "ann") ext = ".ann"
173 else if (format == "fwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/forward//"
174 else if (format == "bwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//";
175 url = getterURL + "getxml?uri=" + rdfprefix + uri + ext + "&format=" +
176 mode_list[5] + "&patch_dtd=" + mode_list[6];
178 if (format == "html" && type == "cic") {
179 keys = getCICHTMLKeys() +
180 "¶m.processorURL=" + escape(processorURL) +
181 "¶m.getterURL=" + escape(getterURL) +
182 "¶m.draw_graphURL=" + escape(draw_graphURL) +
183 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
184 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
185 "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
186 "&prop.encoding=iso-8859-1" +
187 "&prop.media-type=text/html" +
188 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
189 "¶m.encoding=iso-8859-1" +
190 "¶m.media-type=text/html" +
191 "¶m.keys=" + getCICHTMLKeys() +
192 "¶m.interfaceURL=" + escape(interfaceURL);
193 } else if (format == "html" && type == "theory") {
194 keys = getTheoryKeys()+
195 "¶m.processorURL=" + escape(processorURL) +
196 "¶m.getterURL=" + escape(getterURL) +
197 "¶m.draw_graphURL=" + escape(draw_graphURL) +
198 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
199 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
200 "¶m.keys=" + getCICHTMLKeys() +
201 "¶m.thkeys=" + getTheoryKeys() +
202 "¶m.embedkeys=" + getEmbedKeys() +
203 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
204 "¶m.encoding=iso-8859-1" +
205 "¶m.thencoding=iso-8859-1" +
206 "¶m.media-type=text/html" +
207 "¶m.thmedia-type=text/html" +
208 "¶m.interfaceURL=" + escape(interfaceURL) +
209 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
210 } else if (format == "mml_cont" && type == "cic") {
211 keys = escape("d_c,C1")+
212 "&prop.doctype-public="+
214 "&prop.media-type=text/xml" +
215 "¶m.doctype-public=" +
217 "¶m.media-type=text/xml";
218 } else if (format == "mml_cont" && type == "theory") {
219 keys = escape("T1,L,E")+
220 "¶m.keys=" + escape("d_c,C1") +
221 "¶m.thkeys=T1,L,E" +
222 "¶m.embedkeys=" + escape("d_c,TC1") +
224 "¶m.processorURL=" + escape(processorURL) +
225 "¶m.getterURL=" + escape(getterURL) +
226 "¶m.draw_graphURL=" + escape(draw_graphURL) +
227 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
228 "¶m.doctype-public=" +
230 "¶m.thencoding=iso-8859-1" +
231 "¶m.media-type=text/xml" +
232 "¶m.thmedia-type=text/html" +
233 "¶m.interfaceURL=" + escape(interfaceURL) +
234 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
235 } else if (format == "mml_pres" && type == "cic") {
236 keys = getCICMathMLKeys()+
237 "¶m.processorURL=" + escape(processorURL) +
238 "¶m.getterURL=" + escape(getterURL) +
239 "¶m.draw_graphURL=" + escape(draw_graphURL) +
240 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
241 "&prop.doctype-public="+
243 "&prop.media-type=text/xml" +
244 "¶m.doctype-public=" +
246 "¶m.media-type=text/xml" +
247 "¶m.keys=" + getCICMathMLKeys() +
248 "¶m.interfaceURL=" + escape(interfaceURL);
249 } else if (format == "mml_pres" && type == "theory") {
250 keys = getTheoryKeys()+
251 "¶m.keys=" + getCICMathMLKeys() +
252 "¶m.thkeys=" + getTheoryKeys() +
253 "¶m.embedkeys=" + escape("d_c,TC1,G,C2,L") +
254 "¶m.processorURL=" + escape(processorURL) +
255 "¶m.getterURL=" + escape(getterURL) +
256 "¶m.draw_graphURL=" + escape(draw_graphURL) +
257 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
258 "¶m.doctype-public=" +
260 "¶m.thencoding=iso-8859-1" +
261 "¶m.media-type=text/xml" +
262 "¶m.thmedia-type=text/html" +
263 "¶m.interfaceURL=" + escape(interfaceURL) +
264 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
267 var naturalLanguage = typesflags.toLowerCase();
268 if (typesflags != "NO" || type == "theory") {
269 naturalLanguage = mode_list[3];
271 var annotations = cicflags.toLowerCase();
272 if (cicflags != "NO" || type == "theory") {
273 annotations = mode_list[4];
275 url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations + "¶m.topurl=" + top.topurl;
280 else if (type == "cic")
281 return interfaceURL + "?url=" + escape(url);
282 else if (type == "theory")
283 return thinterfaceURL + "?url=" + escape(url)