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 // Qui e sotto da modificare per usare UWOBO!!!
118 top.cicheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.cicuri;
122 function refreshtheoryHeader(headerURL)
124 top.theoryheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.theoryuri;
128 function getCICMathMLKeys()
130 //Important note: do not modify this function without modifying makeURL
131 return escape("d_c,C1,G,C2,L");
134 function makeURL(type,uri,cicflags,typesflags)
137 var processorURL = top.processorURL;
138 var getterURL = top.getterURL;
139 var draw_graphURL = top.draw_graphURL;
140 var uri_set_queueURL = top.uri_set_queueURL;
141 var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
142 var mode_list = mode.split(",");
147 var interfaceURL = top.topurl + "/html/cic/index.html";
148 var thinterfaceURL = top.topurl + "/html/theory/index.html";
150 var output = mode_list[0];
152 if (output == "raw") format = mode_list[1];
153 else format = mode_list[2];
155 if (output == "raw") {
157 if (format == "types") ext = ".types"
158 else if (format == "ann") ext = ".ann";
159 url = getterURL + "getxml?uri=" + uri + ext + "&format=" + mode_list[5] +
160 "&patch_dtd=" + mode_list[6];
162 if (format == "html" && type == "cic") {
163 //Important note: do not modify this function without modifying
165 keys = escape("d_c,C1,HC2,L") +
166 "¶m.processorURL=" + escape(processorURL) +
167 "¶m.getterURL=" + escape(getterURL) +
168 "¶m.draw_graphURL=" + escape(draw_graphURL) +
169 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
170 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
171 "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
172 "&prop.encoding=iso-8859-1" +
173 "&prop.media-type=text/html" +
174 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
175 "¶m.encoding=iso-8859-1" +
176 "¶m.media-type=text/html" +
177 "¶m.keys=" + escape("d_c,C1,HC2,L") +
178 "¶m.interfaceURL=" + escape(interfaceURL);
179 } else if (format == "html" && type == "theory") {
180 keys = escape("T1,T2,L,E")+
181 "¶m.processorURL=" + escape(processorURL) +
182 "¶m.getterURL=" + escape(getterURL) +
183 "¶m.draw_graphURL=" + escape(draw_graphURL) +
184 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
185 "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
186 "¶m.keys=" + escape("d_c,C1,HC2,L") +
187 "¶m.thkeys=" + escape("T1,T2,L,E") +
188 "¶m.embedkeys=" + escape("d_c,TC1,HC2,L") +
189 "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
190 "¶m.encoding=iso-8859-1" +
191 "¶m.thencoding=iso-8859-1" +
192 "¶m.media-type=text/html" +
193 "¶m.thmedia-type=text/html" +
194 "¶m.interfaceURL=" + escape(interfaceURL) +
195 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
196 } else if (format == "mml_cont" && type == "cic") {
197 keys = escape("d_c,C1");
198 } else if (format == "mml_cont" && type == "theory") {
199 keys = escape("T1,L,E")+
200 "¶m.keys=" + escape("d_c,C1") +
201 "¶m.thkeys=T1,L,E" +
202 "¶m.embedkeys=" + escape("d_c,TC1") +
204 "¶m.processorURL=" + escape(processorURL) +
205 "¶m.getterURL=" + escape(getterURL) +
206 "¶m.draw_graphURL=" + escape(draw_graphURL) +
207 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
208 "¶m.doctype-public=" +
210 "¶m.thencoding=iso-8859-1" +
211 "¶m.media-type=text/xml" +
212 "¶m.thmedia-type=text/html" +
213 "¶m.interfaceURL=" + escape(interfaceURL) +
214 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
215 } else if (format == "mml_pres" && type == "cic") {
216 keys = escape("d_c,C1,G,C2,L")+
217 "¶m.processorURL=" + escape(processorURL) +
218 "¶m.getterURL=" + escape(getterURL) +
219 "¶m.draw_graphURL=" + escape(draw_graphURL) +
220 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
221 "&prop.doctype-public="+
223 "&prop.media-type=text/xml" +
224 "¶m.doctype-public=" +
226 "¶m.media-type=text/xml" +
227 "¶m.keys=" + escape("d_c,C1,G,C2,L") +
228 "¶m.interfaceURL=" + escape(interfaceURL);
229 } else if (format == "mml_pres" && type == "theory") {
230 keys = escape("T1,T2,L,E")+
231 "¶m.keys=d_c,C1,G,C2,L" +
232 "¶m.thkeys=T1,T2,L,E" +
233 "¶m.embedkeys=d_c,TC1,G,C2,L" +
234 "¶m.processorURL=" + escape(processorURL) +
235 "¶m.getterURL=" + escape(getterURL) +
236 "¶m.draw_graphURL=" + escape(draw_graphURL) +
237 "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
238 "¶m.doctype-public=" +
240 "¶m.thencoding=iso-8859-1" +
241 "¶m.media-type=text/xml" +
242 "¶m.thmedia-type=text/html" +
243 "¶m.interfaceURL=" + escape(interfaceURL) +
244 "¶m.thinterfaceURL=" + escape(thinterfaceURL);
247 var naturalLanguage = typesflags;
248 if (typesflags != "NO" || type == "theory") {
249 naturalLanguage = mode_list[3];
251 var annotations = cicflags;
252 if (cicflags != "NO" || type == "theory") {
253 annotations = mode_list[4];
255 url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations + "¶m.topurl=" + top.topurl;
260 else if (type == "cic")
261 return interfaceURL + "?url=" + escape(url);
262 else if (type == "theory")
263 return thinterfaceURL + "?url=" + escape(url)