Warning: this page is out of date, current UWOBO page is
available here
UWOBO: a Stylesheet Processor
UWOBO is an XSLT Stylesheet processor running as a HTTP server. It can be contacted
with a proper URL giving the URI of an XML document and a list of stylesheets to
be applied. The processor will apply the stylesheets in the given sequence and
will return the processed document as the result of the invocation.
UWOBO was born at the University of Western Ontario, London, Canada. Since then
it has been further refined and developed at the University of Bologna (hence the
name).
UWOBO is distributed under the GNU General Public License (GPL).
Main authors:
Acknowledgments:
Summary
News
November 12, 2001
UWOBO 1.2.1 released. UWOBO is now released under GPL. The only other
significative change with respect to 1.2.0 is the change of the semantic
of the method add when the stylesheet is already loaded. In 1.2.0 the
request was interpreted as a reload request. It seems more appropriate
to simply ignore it (with a Warning, of course!).
November 8, 2001
UWOBO goes global. UWOBO has been announced on
November 6, 2001
UWOBO 1.2.0 released, incorporating many changes (some also not backward compatible):
- New syntax: methods add, reload and remove can now process multiple
entries with just one method invocation. NO BACKWARD COMPATIBILITY RETAINED.
- Serialization and deserialization: when serialization is enabled, every
time a stylesheet is recompiled it is also serialized on disk. When
booting, UWOBO automatically reloads every serialized stylesheet.
- More verbosity: every method gives back to the user and writes in the log
much more information than before.
- Undocumented methods update and updateAll (whose semantic was unclear)
definitely removed.
Note that, due to syntax changes, also the
panel has
changed.
October 27, 2001
UWOBO 1.1.13 released. Release 1.1.12 was someway incomplete: error responses
were still cached. The problem has been fixed. The output of the help
method has been updated. The file build.xml has also been improved.
October 17, 2001
UWOBO 1.1.12 released. Now responses from the servlet are such that
browsers don't cache them.
October 1, 2001
UWOBO 1.1.11 released. This is just a bug fix: while loading a stylesheet,
the files required and included using a relative URL were searched using
the wrong absolute URL. In particular, the base URL used was not the one
of the main stylesheet, but the path of the directory in which UWOBO was
installed.
March 22, 2001
UWOBO 1.1.10 released. A more flexible support for parameters and output properties is added.
March 13, 2001
UWOBO 1.1.9 released.
March 6, 2001
Syntax for application changed, see below.
February 26, 2001
First public release for UWOBO version 1.0.0.
Requirements
UWOBO is a Java Servlet, thus it should be possible to use it with any "servlet server".
Currently, we use it with
TOMCAT.
The requirements for this servlet are:
- A servlet server, such as TOMCAT
-
The most recent version of the Xerces/Xalan processor.
You may need to patch the TOMCAT installation so that Xerces is used.
-
JDK 1.3, if you are going to compile the source code.
Installation
Download the package and uncompress it somewhere, edit the file
build.xml
and set the property
tomcat.dir with the directory where TOMCAT is
installed. In the directory
uwobo Do
chmod +x ./antRun
./antRun install
(make sure that the
JAVA_HOME environment variable is set and that
Java is in your
PATH). You may have to be root in order
to complete the installation.
When the servlet is installed, restart the servlet server and have fun.
Download
Examples
The HELM library on-line is rendered on the fly by means of the UWOBO servlet.
You can browse the library
here.
For some examples of invocation of the processor, take a look at the pages
of the library.
Reference
The processor accepts a number of commands, each possibly followed by a variable
number of arguments. A generic URL to contact the processor is the following:
http://hostname/helm/servlet/uwobo/cmd
Where
hostname is the host running the processor and
cmd is one of the following
commands:
- help
Gives a brief description of the available commands, along with the processor version
and compile date and time.
- add?bind=key,stylesheet[&bind=key,stylesheet]*
Compiles a stylesheet into the processor.
You must specify a key to refer to the added stylesheet in subsequent
operations. If serialization is enabled, i.e. if the SERIALIZATION_DIR
property is set to a not-empty value, the compiled stylesheet is also
serialized on disk. All serialized stylesheets are automatically
re-activated during UWOBO start-up when serialization is enabled.
- remove[?keys=key1_,...,key_n]
Removes the stylesheets with the given key.
If no key is specified, all currently loaded stylesheets will be removed.
If serialization is enabled, the serialized stylesheets are also removed
from disk.
- list
Lists all the stylesheets compiled into the processor along with their
keys and some other (useful?) information about the output format.
- reload[?keys=key_1,...,key_n]
Reloads the stylesheets with the given key.
If no key is given, then all the stylesheets compiled into the processor
are reloaded. This command is often useful while developing stylesheets.
If serialization is enabled, the serialized form is also updated.
- apply?xmluri=source&keys=key_1,...,key_n[¶m.name=value]*[¶m.key.name=value]*[&prop.name=[value]]*
The most important command, at last. Its parameters have the following
meanings:
-
xmluri: a URI to the source XML document to be processed.
-
keys: the (ordered) sequence of keys representing the stylesheets to
be applied.
-
param.name: a global parameter to be passed to all the
stylesheets.
-
param.key.name: a parameter local to the
stylesheet identified by the key. The parameter is passed only to
this stylesheet. This may be useful if one has a parameter with the same
name in different stylesheets and wants to pass different
values to that parameter in the different cases. Note that if
the same stylesheet is applied several times, the same value of the parameter
will be passed at each application. This might not be what you want, but
is the way the processor is implemented right now.
-
prop.name: a property of the processed output document.
You can thus override the value of one or more properties described
in the XSLT specification regarding the <xsl:output>
element, possible values are method, encoding and so on.
WARNINGS (non backward-compatible syntax changes):
- the syntax for stylesheet application changed from version 1.0.0
to version 1.1.0! The old syntax was:
apply?xmluri=source[&key=name]+[¶m.name=value]*
- the syntax for stylesheet removal changed from version 1.1.13 to
version 1.2.0! The old syntax was:
remove[?key=name]
- the syntax for stylesheet reloading changed from version 1.1.13 to
version 1.2.0! The old syntax was:
reload[?key=name]
- undocumented method update (whose semantic was unclear) was
definitely removed in version 1.2.0.
Panel
We have designed a simple Web page which allows a simple interaction with the
processor. Currently, the page is tuned to be used in the context of HELM, but
you can download and customize it to your needs. Browse the panel
here.