Copyright © 2002 Robert Barta
Abstract
Slide shows are a frequent method to transport concepts to a live audience. Due to the limited space and the presence of a speaker slide shows typically contain topics, together with a short description and how they are related to other concepts. Exactly this kind of knowledge can also be denoted in Topic Maps. This document describes the setup how slide shows can be generated from Topic Map-encoded knowledge using a SAX handler.
Table of Contents
Topic Maps have been designed to hold flat knowledge. They can contain topics, their place in an ontology (type system), some description and references. And they usually relationships between these topics.
As such, they have some similarity with slide shows with the exception that these documents are presented for a particular purpose for a particular audience and for a particular presenter. Still, it seems inefficient to store flat knowledge into a slide show if it already exists in Topic Maps.
Let us assume that we already have a number of Topic Maps and that these contain topics and concepts which we would like to map into a slide show. Obviously this process cannot be fully automated as
In this light, the slide generator is a TM query engine which is used to extract the requested information. The query engine, though, will be specialized and tailored for the generation of slides.
For obvious reasons the generated output is an XML language (called here SlideML) to allow conversion into other XML languages. The conversion is thus controlled via namespaces:
Involved Namespaces
The slide generator will first consult an incoming XML document about the modalities of the slide show. To allow for a maximum of flexibility, the generator does only process XML elements from the http://topicmaps.bond.edu.au/smile/1.0/ namespace. All other elements will be passed through transparently. This allows to use the smile elements in any XML document whether this is now slide-oriented or not.
Following incoming elements belong to the smile namespace and are detected by the generator:
Smile Elements
A format string describes what exactly should be included in the generated slide. The default format is
"%ti %ty %rd %ins %res"and takes care that a title, types, inlines (resourceData), instances and references (occurrences) of that particular topic are included on a slide in that particular order.
One format specifier is introduced with a '%' character, several such specifiers are separated bu one or more blanks. Following specifiers are honored:
Format Specifiers
Since most final slide formats have space limitations for slides, there is also a way to limit the number of things which are added to a particular slide. A typical scenario is to start with a topic, its explanation and the various instances of this topic. If that topic has too many of these instances to fit onto a slide, then the remaining instances can be moved to a second slide:
<!-- first two instances --> <astma:slide astma:tid="client-side-presentation-technology" astma:format="%ti %in[1-2]"/> <!-- same but as a followup slide, all other instances and with continue --> <astma:slide astma:tid="client-side-presentation-technology" astma:format="%ti %in[3-]" astma:continue="yes"/> </slides>
Following format specifiers can have a range modifier:
Once the slide generator has detected an element in the smile namespace, it will retrieve the topic information from the backend Topic Map database. As result, the generator will format this information into SlideML elements. (You can find the DTD in the appendices.) SlideML instances can then be converted into other formats (see Backends).
Let us assume we had a topic map covering web programming in an AsTMa file called webprogramming.atm. A slide show can be defined via the following XML document:
<?xml version="1.0" standalone="yes"?> <slides name="The Mystery Tour, 2002" xmlns = "http://topicmaps.bond.edu.au/SlideML/" xmlns:astma = "http://topicmaps.bond.edu.au/astma/1.0/" xmlns:smile = "http://topicmaps.bond.edu.au/smile/1.0/"> <institution>Bond University</institution> <astma:default astma:tau_expr="file:webprogramming.atm"/> <!-- this loads the map(s) --> <!-- first slide, no detailed specification, so the default format will be used --> <astma:slide astma:tid="web-programming"/> <!-- second slide, explicit format, first two instances --> <astma:slide astma:tid="client-side-presentation-technology" astma:format="%ti %in[1-2]"/> <!-- same but as a followup slide, all other instances --> <astma:slide astma:tid="client-side-presentation-technology" astma:format="%ti %in[3-]" astma:continue="yes"/> </slides>
<slides name="The Mystery Tour, 2002" xmlns = "http://topicmaps.bond.edu.au/SlideML/" xmlns:astma = "http://topicmaps.bond.edu.au/astma/1.0/" xmlns:smile = "http://topicmaps.bond.edu.au/smile/1.0/"> <institution>Bond University</institution> <!-- first slide, no detailed specification, so the default format will be used --> <smile:slide smile:tid='web-programming'> <smile:title>web programming</smile:title> <smile:types> <smile:type>programming</smile:type> </smile:types> <smile:inlines> <smile:inline>web programming implements a particular application in a client/server scenario</smile:inline> </smile:inlines> <smile:instances>server side programming, client side programming</smile:instances> <smile:references /> </smile:slide> <!-- second slide, explicit format, first three instances --> <smile:slide smile:tid='client-side-presentation-technology'> <smile:title>client-side presentation technology</smile:title> <smile:instances> <smile:instance>XHTML</smile:instance> <smile:instance>CSS, Cascading Style Sheets</smile:instance> </smile:instances> </smile:slide> <!-- same but as a followup slide, all other instances --> <smile:slide smile:tid='client-side-presentation-technology' smile:continue='yes'> <smile:title>client-side presentation technology</smile:title> <smile:instances> <smile:instance>HTML4</smile:instance> <smile:instance>Dynamic HTML</smile:instance> </smile:instances> </smile:slide> </slides>
The distribution consists of a Perl binary stm2sml.pl which makes use of a specific SAX processor to perform the transformation. This binary comes with its own documentation, but basically it is invoked like
cat slidedefinition.stm | stm2sml.pl --urlbase=/where/are/topic/maps/ > slides.xml
Aside from transforming SlideML instances into other XML based slides presentations such as
these instances can also be converted into HTML and PDF (via LaTeX and Prosper) using the Makefile in the backends directory. This file makes use of xsltproc which comes with the libxslt package.
<!ELEMENT slide (title|types|inlines|instances|references)*> <!ATTLIST slide title CDATA #REQUIRED topic CDATA #REQUIRED> <!ELEMENT title #PCDATA> <!ELEMENT types (type+|#PCDATA)> <!ELEMENT type #PCDATA> <!ELEMENT inlines (inline+|#PCDATA)> <!ELEMENT inline #PCDATA> <!ELEMENT instances (instance+|#PCDATA)> <!ELEMENT instance (description|#PCDATA)> <!ELEMENT references reference+> <!ELEMENT reference EMPTY> <!ATTLIST reference href CDATA #REQUIRED type CDATA 'simple' #FIXED> ]