From 6a9b659a4103f1f536d7f8ef7049e77ca7ed6874 Mon Sep 17 00:00:00 2001 From: no author Date: Fri, 6 Apr 2001 14:02:03 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'helm'. --- helm/uwobo-panel/.cvsignore | 1 + helm/uwobo-panel/Makefile | 12 + helm/uwobo-panel/control.html | 425 ++++++++++++++++++++++++++++++++++ helm/uwobo-panel/control.js | 186 +++++++++++++++ helm/uwobo-panel/index.html | 8 + helm/uwobo-panel/welcome.html | 6 + 6 files changed, 638 insertions(+) create mode 100644 helm/uwobo-panel/.cvsignore create mode 100644 helm/uwobo-panel/Makefile create mode 100644 helm/uwobo-panel/control.html create mode 100644 helm/uwobo-panel/control.js create mode 100644 helm/uwobo-panel/index.html create mode 100644 helm/uwobo-panel/welcome.html diff --git a/helm/uwobo-panel/.cvsignore b/helm/uwobo-panel/.cvsignore new file mode 100644 index 000000000..335ec9573 --- /dev/null +++ b/helm/uwobo-panel/.cvsignore @@ -0,0 +1 @@ +*.tar.gz diff --git a/helm/uwobo-panel/Makefile b/helm/uwobo-panel/Makefile new file mode 100644 index 000000000..cb5610d15 --- /dev/null +++ b/helm/uwobo-panel/Makefile @@ -0,0 +1,12 @@ + +all: + +clean: + rm -f uwobo-panel.tar.gz + +cleanbak: + rm -rf *~ + +dist: clean cleanbak + cd ..; tar cvfz uwobo-panel.tar.gz panel ; mv uwobo-panel.tar.gz panel + diff --git a/helm/uwobo-panel/control.html b/helm/uwobo-panel/control.html new file mode 100644 index 000000000..91c2e0714 --- /dev/null +++ b/helm/uwobo-panel/control.html @@ -0,0 +1,425 @@ + + + +UWOBO Control Panel + + + + + + + + + + + +
UWOBO Control Panel
+ +
+ +
+This is a control panel for the UWOBO servlet. You can control a local or remote UWOBO servlet by filling +the appropriate fields below and sending the desired commands. In most cases, results of commands, such as error +messages or documents, will be opened in the frame at the bottom of this page. For those commands sending multiple +requests to the UWOBO server, a new window will be opened for each request issued. Note that in order to use +this page you must have JavaScript enabled. +If you have troubles, please send an email to the author: +luca.padovani@cs.unibo.it + +

+ +The sections: + + +In case you want to customize the panel for your own needs, you can download the source archive +(HTML + JavaScript): + + +
+ + + + + + + +
Global Parameterstop
+ +
+ +
+The following are global parameters used by all the other section to contact the UWOBO servlet and possibly a +getter. The getter is not required for some operations and can be excluded by unchecking the proper buttons +below. + +

+ +The following is the URL used to contact the UWOBO servlet. Note that the servlet is usually launched by +
TOMCAT. localhost is relative to your machine. + +

+ + + + + + + + + + +
UWOBO URL
+
+ +
+
+
+ +
+
+
+ +
+
+ +The following is the URL used to contact the getter. The getter is usually launched manually. +In all cases except for the check button below, +localhost is relative to the host running UWOBO, because the getter URL is sent as +a parameter along with UWOBO commands. In other words, localhost is the host +running UWOBO and not your machine. + +

+ + + + + + + + + + +
Getter URL
+
+ +
+
+
+ +
+
+
+ +
+
+
+ + + + + + + +
Queriestop
+ +
+ +
+ +The following are commands to do some simple queries about the UWOBO servlet. + +

+ + + + + + + + + + + + + + +
+ Retrieve the version of the UWOBO servlet running at the UWOBO URL and list the syntax + of the accepted commands. + You can use this button to verify that a UWOBO servlet + is actually running there: +
+ Ask UWOBO for a list of the stylesheets currently compiled inside the servlet, along with their keys: +
+ +
+ +
+ +
+ + + + + +
Stylesheet Managementtop
+ +
+ +
+ +In this section you can add, remove and reload stylesheet into the server. There are +some frequently used stylesheets whose URIs and keys can be automatically filled in +by selecting one of the options of the box below. Note that for such stylesheets +the getter is used by default (you can deselect it, however): + +

+ + + + + + + + + + +
Predefined Stylesheets
+
+ +
+
+
+ +
+
+
+ +
+
+ +Here you have to identify a stylesheet by means of a relative or absolute URI. Usually +you will specify a relative URI when using the getter to retrieve the stylesheet. +Moreover, you can specify a key associated to this stylesheet, so that it will be easier to +refer to it in subsequent operations. If escaping is enabled, then the stylesheet URI will +be escaped. This might be particularly useful if the stylesheet is loaded by the getter. + +

+ + + + + + + + + + + + + + + + + +
StylesheetKeyUse GetterEscape
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+ +Use the buttons below to remove or reload all the stylesheets inside the servlet. Use these commands with +care, and remember that the servlet can be shared among different users: + +

+ + + + + + +
+
+ +
+
+
+ +
+
+
+ +
+ + + + + +
Processingtop
+ +
+ +
+ +You can use the "Apply" command to perform a transformation. Specify the URI of the source +document in the form below. The URI can be relative or absolute (in the former case you +will probably want to enable the use of the getter). +If escaping is enabled, then special characters are escaped. This might be particularly useful +if the source is loaded by the getter. + +

+ + + + + + + + + + +
Source DocumentEscape
+
+ +
+
+
+ +
+
+ +You can specify a sequence of zero or more parameters separated by blanks. Each +parameter is made of a name immediately followed by = and then a value. +If "Escape" is checked, then parameters are escaped in the final +URI. + +

+ + + + + + + + + + +
Parameters (optional)Escape
+
+ +
+
+
+ +
+
+ +In the key list specify a list of keys +separated by blanks. This is the list of stylesheets to be applied in sequence to the +source document. +When ready, click on the button and have fun! + +

+ + + + + + + + + + + +
Key listUse Getter
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+ + + + + + +
Page maintained by: Luca Padovanitop
+ + + + + diff --git a/helm/uwobo-panel/control.js b/helm/uwobo-panel/control.js new file mode 100644 index 000000000..258163f97 --- /dev/null +++ b/helm/uwobo-panel/control.js @@ -0,0 +1,186 @@ + +function getParam(name, def) +{ + var search = top.location.search; + search = search.slice(1); + var args = search.split("&"); + var value = "-1"; + for (var i = 0 ; i < args.length ; i++) { + var couple = args[i].split("="); + if (couple[0] == name) value = couple[1]; + } + if (value == "-1") value = def; + return value; +} + +function getInitialProcessorURL() +{ + return getParam("processorURL", "http://phd.cs.unibo.it:8080/helm/servlet/uwobo/"); +} + +function getInitialGetterURL() +{ + return getParam("getterURL", "http://phd.cs.unibo.it:8081/"); +} + +function getUwoboURL() +{ + return document.uwoboURL.elements[0].value; +} + +function getGetterURL() +{ + return document.getterURL.elements[0].value; +} + +function selectUwoboURL(ss) +{ + if (ss.selectedIndex == 0) { + document.uwoboURL.elements[0].value = ""; + } else { + document.uwoboURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":8080/helm/servlet/uwobo/"; + } +} + +function selectGetterURL(ss) +{ + if (ss.selectedIndex == 0) { + document.getterURL.elements[0].value = ""; + } else { + document.getterURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":8081/"; + } +} + +function getPredefinedStylesheetKey(i) +{ + var v = document.predefinedStylesheets.elements[0].options[i].value; + var va = v.split(","); + return va[0]; +} + +function getPredefinedStylesheetURI(i) +{ + var v = document.predefinedStylesheets.elements[0].options[i].value; + var va = v.split(","); + return va[1]; +} + +function getPredefinedStylesheetUseGetter(i) +{ + var v = document.predefinedStylesheets.elements[0].options[i].value; + var va = v.split(","); + return va[2]; +} + +function selectPredefinedStylesheet(ss) +{ + if (ss.selectedIndex == 0) { + document.stylesheetURI.elements[0].value = ""; + document.stylesheetKey.elements[0].value = ""; + } else { + document.stylesheetURI.elements[0].value = getPredefinedStylesheetURI(ss.selectedIndex); + document.stylesheetKey.elements[0].value = getPredefinedStylesheetKey(ss.selectedIndex); + } + + document.loadUseGetter.elements[0].checked = getPredefinedStylesheetUseGetter(ss.selectedIndex) == "true" ? true : false; + document.loadEscape.elements[0].checked = true; +} + +function getStylesheetURL() +{ + var s; + + if (document.loadUseGetter.elements[0].checked) { + s = getGetterURL() + "getxslt?uri=" + document.stylesheetURI.elements[0].value; + } else { + s = document.stylesheetURI.elements[0].value; + } + + if (document.loadEscape.elements[0].checked) s = escape(s); + + return s; +} + +function loadStylesheet() +{ + top.result.location = getUwoboURL() + "add?xsluri=" + getStylesheetURL() + "&key=" + document.stylesheetKey.elements[0].value; +} + +function removeStylesheet() +{ + top.result.location = getUwoboURL() + "remove?key=" + document.stylesheetKey.elements[0].value; +} + +function removeAllStylesheets() +{ + top.result.location = getUwoboURL() + "remove"; +} + +function reloadStylesheet() +{ + top.result.location = getUwoboURL() + "reload?key=" + document.stylesheetKey.elements[0].value; +} + +function loadAllPredefined() +{ + with (document.predefinedStylesheets.elements[0]) { + var i; + + for (i = 1; i < length; i++) + open(getUwoboURL() + + "add?xsluri=" + escape((getPredefinedStylesheetUseGetter(i) == "true" ? (getGetterURL() + "getxslt?uri=") : "") + getPredefinedStylesheetURI(i)) + + "&key=" + getPredefinedStylesheetKey(i), + getPredefinedStylesheetKey(i), + "toolbar=0,location=0,directories=0,status=0,menubar=0,width=400,height=200"); + } +} + +function removeAllPredefined() +{ + with (document.predefinedStylesheets.elements[0]) { + var i; + + for (i = 1; i < length; i++) + open(getUwoboURL() + "remove?key=" + getPredefinedStylesheetKey(i), + getPredefinedStylesheetKey(i), + "toolbar=0,location=0,directories=0,status=0,menubar=0,width=400,height=200"); + } +} + +function applyStylesheets() +{ + var i = 0; + var keyList = document.keyList.elements[0].value.split(" "); + + var url = getUwoboURL() + "apply?xmluri="; + + var sourceURL = ""; + + if (document.applyUseGetter.elements[0].checked) + sourceURL += getGetterURL() + "getxml?uri="; + + sourceURL += document.sourceDocument.elements[0].value; + + if (document.escapeSource.elements[0].checked) + url += escape(sourceURL); + else + url += sourceURL; + + url += "&keys="; + for (i = 0; i < keyList.length; i++) { + url += keyList[i]; + if (i < keyList.length - 1) url += ","; + } + + var paramList = document.parameters.elements[0].value.split(" "); + for (i = 0; i < paramList.length; i++) + if (paramList[i].length > 0) { + if (document.escapeParameters.elements[0].checked) { + var p = paramList[i].split("="); + url += "¶m." + p[0] + "=" + escape(p[1]); + } else + url += "¶m." + paramList[i]; + } + + top.result.location = url; +} diff --git a/helm/uwobo-panel/index.html b/helm/uwobo-panel/index.html new file mode 100644 index 000000000..caeebcf24 --- /dev/null +++ b/helm/uwobo-panel/index.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/helm/uwobo-panel/welcome.html b/helm/uwobo-panel/welcome.html new file mode 100644 index 000000000..f6fbed438 --- /dev/null +++ b/helm/uwobo-panel/welcome.html @@ -0,0 +1,6 @@ + + + + + + -- 2.39.2