Generating Web Sites from XTM Topic Maps

Problem

You want to capture knowledge about a subject in a Topic Map. You want to do so in a way that facilitates generation of a web site from the Topic Map using XSLT.

Solution

The solution is based on the Cogitative Topic Maps Web Site (CTW) framework introduced to readers in XML Topic Maps, edited by Jack Park (Addison Wesley, 2002). Extreme Markup Languages initially presented this work in 2000.

Readers unfamiliar with Topic Maps may want to read Section 11.3.3 in Recipe 11.3 first or refer to Section 11.3.4 and this recipe for more resources.

The CTW uses the following mapping from topic map elements to HTML:

Topic map element

HTML rendering

Topic map

Web site

Topic

Web page

Topic associations

Site map

Topic occurrences

Images, graphics, text, HTML fragments, etc.

Topic names

Page Headers, Titles, Lists, and Hyperlink titles

The Topic Map we create covers the subject of algorithms and, specifically, sorting algorithms. Knowledge represented in this topic map was aggregated from information resources gathered on the Internet and organized as class-subclass associations between algorithms and occurrences of types descriptions, demonstrations, and code examples in several programming languages.

Once the subject and content of the web site were decided, the ontology of the web site subjects and objects followed quite naturally. The CTW ontology layer consists of two main parts: classification of web site’s topic subjects ...

Get XSLT Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.