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 makeURL(type,uri,cicflags,typesflags)
140 var processorURL = top.processorURL;
141 var getterURL = top.getterURL;
142 var draw_graphURL = top.draw_graphURL;
143 var uri_set_queueURL = top.uri_set_queueURL;
144 var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
145 var mode_list = mode.split(",");
150 var interfaceURL = top.topurl + "/html/cic/index.html";
151 var thinterfaceURL = top.topurl + "/html/theory/index.html";
153 var output = mode_list[0];
155 if (output == "raw") format = mode_list[1];
156 else format = mode_list[2];
158 if (output == "raw") {
161 if (format == "types") ext = ".types"
162 else if (format == "ann") ext = ".ann"
163 else if (format == "fwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/forward//"
164 else if (format == "bwd") rdfprefix = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//";
165 url = getterURL + "getxml?uri=" + rdfprefix + uri + ext + "&format=" +
166 mode_list[5] + "&patch_dtd=" + mode_list[6];
168 if (format == "html" && type == "cic") {
169 keys = escape("d_c,C1,HC2,L") +
170 "¶m.processorURL=" + escape(processorURL) +
171 "¶m.getterURL=" + escape(getterURL) +
172 "¶m.draw_graphURL=" + escape(draw_graphURL) +
173 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
174 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
175 "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
176 "&prop.encoding=iso-8859-1" +
177 "&prop.media-type=text/html" +
178 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
179 "¶m.encoding=iso-8859-1" +
180 "¶m.media-type=text/html" +
181 "¶m.keys=" + escape("d_c,C1,HC2,L") +
182 "¶m.interfaceURL=" + escape(interfaceURL);
183 } else if (format == "html" && type == "theory") {
184 keys = getTheoryKeys()+
185 "¶m.processorURL=" + escape(processorURL) +
186 "¶m.getterURL=" + escape(getterURL) +
187 "¶m.draw_graphURL=" + escape(draw_graphURL) +
188 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
189 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
190 "¶m.keys=" + escape("d_c,C1,HC2,L") +
191 "¶m.thkeys=" + getTheoryKeys() +
192 "¶m.embedkeys=" + escape("d_c,TC1,HC2,L") +
193 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
194 "¶m.encoding=iso-8859-1" +
195 "¶m.thencoding=iso-8859-1" +
196 "¶m.media-type=text/html" +
197 "¶m.thmedia-type=text/html" +
198 "¶m.interfaceURL=" + escape(interfaceURL) +
199 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
200 } else if (format == "mml_cont" && type == "cic") {
201 keys = escape("d_c,C1");
202 } else if (format == "mml_cont" && type == "theory") {
203 keys = escape("T1,L,E")+
204 "¶m.keys=" + escape("d_c,C1") +
205 "¶m.thkeys=T1,L,E" +
206 "¶m.embedkeys=" + escape("d_c,TC1") +
208 "¶m.processorURL=" + escape(processorURL) +
209 "¶m.getterURL=" + escape(getterURL) +
210 "¶m.draw_graphURL=" + escape(draw_graphURL) +
211 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
212 "¶m.doctype-public=" +
214 "¶m.thencoding=iso-8859-1" +
215 "¶m.media-type=text/xml" +
216 "¶m.thmedia-type=text/html" +
217 "¶m.interfaceURL=" + escape(interfaceURL) +
218 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
219 } else if (format == "mml_pres" && type == "cic") {
220 keys = getCICMathMLKeys()+
221 "¶m.processorURL=" + escape(processorURL) +
222 "¶m.getterURL=" + escape(getterURL) +
223 "¶m.draw_graphURL=" + escape(draw_graphURL) +
224 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
225 "&prop.doctype-public="+
227 "&prop.media-type=text/xml" +
228 "¶m.doctype-public=" +
230 "¶m.media-type=text/xml" +
231 "¶m.keys=" + getCICMathMLKeys() +
232 "¶m.interfaceURL=" + escape(interfaceURL);
233 } else if (format == "mml_pres" && type == "theory") {
234 keys = getTheoryKeys()+
235 "¶m.keys=" + getCICMathMLKeys() +
236 "¶m.thkeys=" + getTheoryKeys() +
237 "¶m.embedkeys=" + escape(d_c,TC1,G,C2,L) +
238 "¶m.processorURL=" + escape(processorURL) +
239 "¶m.getterURL=" + escape(getterURL) +
240 "¶m.draw_graphURL=" + escape(draw_graphURL) +
241 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
242 "¶m.doctype-public=" +
244 "¶m.thencoding=iso-8859-1" +
245 "¶m.media-type=text/xml" +
246 "¶m.thmedia-type=text/html" +
247 "¶m.interfaceURL=" + escape(interfaceURL) +
248 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
251 var naturalLanguage = typesflags;
252 if (typesflags != "NO" || type == "theory") {
253 naturalLanguage = mode_list[3];
255 var annotations = cicflags;
256 if (cicflags != "NO" || type == "theory") {
257 annotations = mode_list[4];
259 url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations + "¶m.topurl=" + top.topurl;
264 else if (type == "cic")
265 return interfaceURL + "?url=" + escape(url);
266 else if (type == "theory")
267 return thinterfaceURL + "?url=" + escape(url)