How to create your own views in open-steam
Content
OverviewData flow
Write your own stylesheet
Setting up the stylesheet
Package creation
Literature
Overview
This Manual provides information on how to create your own views on rooms, containers, documents and objects in general, which are hostet by the open-steam server. Prerequisite for an understanding and successful usage of this manual are a fundamental knowledge about the koncept of Virtual Knowledge Rooms, the realisation of that concept in open-stem and skills in web technologies like HTML, CSS, XML and XSLT. You will find corresponding links to help sites, tutorials and publications on open-steam respectively the virtual knowledge room concept in the literature section.
Data flow
You can create your own views on objects (rooms in most cases) by writing a XSLT stylesheet and an associated XGL file (XGL: XML Generation Language).The stylesheet (XSL file) involves a XML tree into transformation into HTML that is generated from the data of the actual object (context). Which values the XML tree will contain is specified in a XGL file that ist assigned to the stylesheet by name (e.g. content.xsl and content.xsl.xml). The xsl.xml file contains detailt information on generation of the XML data tree (More information about XGL at XGL-Wiki).
For the sake of completeness it should be mentioned that for speed optimization reasons a Pike script is generated from the XGL file on the server side which produces the XML data tree at last. During the creation of your own view you will however never see that script.

The data flow during HTML page generation
Our system stylesheets can be found under /stylesheets/ in the open-steam system via https.
At first a xsl.xml file is needed that describes what the XML data tree should consist of. That file could look something like this:
The resulting XML tree looks like this (shortened):

Aperture of the XML data tree
(See the complete XML data tree)
By adding "source=true" to the URL of a generated page you can anytime view the XML data tree of that page. That is functioning with every HTML page that has been generated by XSL transformation in open-steam.
How a HTML page shall look like and where which data element from the XML data tree shall appear in the page is specified in the stylesheet:
The XSL entry point
What we have is a XML data tree that is filled with values of the actual object we are looking at (a room for instance). How the resulting HTML page shall look like is defined in the XSL file. The entry point is the template called "Object" defined in the stylesheet. The whole HTML code of the page to be generated is located inside og this template. At the positions in the page, where information of the actual object from the XML data tree shall appear the appropriate XSLT commands are used:
A XSLT stylesheet example:
The example shows the name and content of the container respectively room it is applied to. The generated HTML page could look something like that:

HTML output of the stylesheet exmple
Setting up the stylesheet
Create a steam package
The package format is quiet simple. All files are saved in a single tar file with the suffix .spm. The following folder structure has to be kept to have the package installable:
- files/ - The files in this folder will be transfered "1 to 1" into the open-steam file system. The folder files/system would for instance be created directly inside the root folder of the steam server.
-
package/ - Contains the package module, which is automaticaly beening installed. The instance is then available under /packages/
/ . The folder can contain an optional XSLT stylesheet which is then used for display of the package (has to be named pakage.xsl!). Is an arbitrary named image file supplied in addition to that it is used as icon for the package and its main module. -
src/ - The files in this folder go to /packages/
/src
The root folder of the package has to contain a file named package.xml, which is describing the package. The structure of such a package description file can be gathered from the following example.
The example shows the configuration of a package named "scorm" which adds SCORM (SCORM: Sharable Content Object Reference Model) support to the open-steam server. As you can see it requires a server version higher than 1.7.0 and the web interface in version higher than 1.6.0.
Literature
- www.w3schools.com - HTML, CSS, XSL, XPath, XSLT and XML tutorials and information
- de.selfhtml.org/ - A very good HTML and CSS reference (in german)
- steam-architektur.pdf - Description of the open-steam architecture (in german)
- sTeam-Providing Primary Media Functions for Web-Based Computer-Supported Cooperative Learning.pdf - The concept of virtual knowledge rooms