SPLCMS Introduction and Screenshots
SPLCMS is one of the example applications from the WebSPL framework,
which is part of SPL
. It is a small CMS (Content
Management System) in less then 500 lines of SPL code. The sources
can be browsed here
SPLCMS is a simple Content Management System written in SPL. It is using XML
for storing the actual
content and XSLT
for rendering static HTML
The administrator can define his own objects for representing the content
objects. This object definitions are stored in the classes.xml
file. Users can then create and modify such
content objects using the editor backend (splcms.webspl
The actual HTML files are rendered using the render.xsl
XSLT file. This XSLT is processed for every output HTML file.
The rendering process is triggered by clicking on the "(Re-)Render HTML
Files" button in the editor backend or by manually executing the render.spl
file contains the descriptions of the content
object classes. Each
content object class has a name, a list of allowed child classes, a short
automatically creating object titles in the editing backend and a list of
parameters are the actual data tuples assoziated with an object.
Each object is represented as an XML node in the data.xml
The class name is
used as XML element name in the file.
Each parameter again has a name, a type and some information for the
editing backend how a parameter
should be displayed in the backend. The type is eigther attribute
parameters are stored directly in the object XML element
as XML attributes,
parameters are stored as child elements.
Have a look at the example classes.xml
file. It is pretty much self explainatory.
The XSLT renderer is implemented in the seperate script file
. This makes it
easier to make local modification to the rendering process.
This script creates a list of all <page> elements in the
file and is
for each <page> element. The output of
the XSLT is then
written to an HTML file named after the name= attribute of the <page>
element. So, if you
would like to use render.spl
unmodified you need to specify a
and this class needs to have a name
parameter of the
type. The HTML files are stored in the html/
The page name is passed as XSLT parameter page
to the XSLT.
The files from the static/
directory (usually images and the CSS
automatically symlinked to the html/
Additional logic (such as fetching external RSS
feeds) can be
easily added to the render.spl