XIMS Publishing Architecture

The following figure gives a rough overview of the publishing architecure.

Unpublished objects are present only in the XIMS content repository. By publishing them, they are copied to the filesystem of the web-server. The publishing details shown in the following figure should help to unterstand the logic and data flow during the publishing process.

For every content object-type exists an Exporter Sub-class there object type specifics can be honored. Such specifics can include the use of special SAX filters for resolving content IDs to paths, resolving links, or including dependent objects. Before the final object serialization to disk, it is possible to transform XML based objects using special export stylesheets. Those stylesheets are located in XIMS::XIMSROOT() . '/stylesheets/exporter/'. Through modifying or adding stylesheets there you can control the format of the exported XML files. The stylesheet should expect its input in the XIMS document schema. To get a more concrete idea using a specific example get the untransformed object during a default event by adding the querystring parameter "passthru=1" to the URL.

https://yourbox/goxims/content/xims/foo.html?passthru=1

In case of the Document object-type, export_document.xsl transforms the original XML document to the model expected by the stylesheets for the published documents. Example stylesheets which are used by xims.uibk.ac.at can be found in XIMS::PUBROOT() . '/stylesheets/'. Transforming published documents with Apache Axkit is the default setup. Alternatively, the export stylesheets could be modified to output HTML directly to the filesystem, resulting in static documents to be served by a non-Apache-AxKit-powered web-server.

Note: The XML seen here during event_default() is not exactly identical to the one the export stylesheets get to process, because as mentioned before, it could be modified through SAX filters before being transformed.

[ top ]

SiteRoots and AxKit Config

SiteRoots are DepartmentRoot-like containers there properties for a published web-site can be set in future releases of XIMS. Currently, only SiteRoot-Stylesheet, -Image, and -Portlets can be set and only the SiteRoot-Image and -Portlets are exported during publishing. In the future, SiteRoots will support being configured as virtual root in the user-interface (i.e. users will see /siteroot/ as root container for the path navigation) as well as support other side-wide settings to be inherited by descendant objects.

Why use SiteRoots now? SiteRoots can already be used to manage the different look and feel of sites managed by one single XIMS installation. This can be achieved by using different XSL-stylesheets associated with different Apache AxKit configuration settings for the various sites. Let us assume that we have got two SiteRoots /foo and /bar in our XIMS installation with XSL-stylesheets located in /foo/stylesheets/ and /bar/stylesheets/ and we want to associate them with two different servers foo.tld and bar.tld. The servers are configured using Apache's virtual hosts capability similar to the following example:

NameVirtualHost *
<VirtualHost *>
    ServerName foo.tld
    DocumentRoot /www/ximspubroot/foo
    Include conf/foo.tld.axkit-conf
</VirtualHost>

<VirtualHost *>
    ServerName bar.tld
    DocumentRoot /www/ximspubroot/bar
    Include conf/bar.tld.axkit-conf
</VirtualHost>

Using Apache AxKit's configuration mechanisms we couple different stylesheets with the two sites. An example foo.tld.axkit-conf could look like the following:

<Files *.html>
    SetHandler axkit

    AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT
    AxErrorStylesheet text/xsl /stylesheets/error.xsl

    AxAddPlugin Apache::AxKit::Plugin::Passthru
    AxAddPlugin Apache::AxKit::StyleChooser::UserAgent
    AxAddPlugin Apache::AxKit::StyleChooser::QueryString

    AxAddPlugin Apache::AxKit::Plugin::AddXSLParams::Request
    PerlSetVar AxAddXSLParamGroups "Request-Common HTTPHeaders VerboseURI"

    PerlSetVar AxUAStyleMap "#default => IE, textonly => Lynx"
    <AxMediaType screen>
        <AxStyleName "#default">
            AxAddProcessor text/xsl /stylesheets/default.xsl
        </AxStyleName>
        <AxStyleName print>
            AxAddProcessor text/xsl /stylesheets/default_print.xsl
        </AxStyleName>
        <AxStyleName textonly>
            AxAddProcessor text/xsl /stylesheets/default_textonly.xsl
        </AxStyleName>
    </AxMediaType>
    #AxDebugLevel 5
</Files>

By editing and publishing /foo/stylesheets/default.xsl and the other stylesheets, the two sites can be skinned differently.

Do not forget to set the SiteRoot URL to the respective URL of the sites and the value of XIMS::Config::ResolveRelToSiteRoots() in Config.pm and $resolvereltositeroots in www/ximsroot/stylesheets/config.xsl to '1' if you are serving different XIMS sites using virtual hosting like shown in this example.

[ top ]