Personal tools

Skip to content. | Skip to navigation

 
You are here:
We are in the process of updating this content to reflect changes to the latest release of AKOMA NTOSO!!!
Document Actions

9. Stylesheets


AKOMA NTOSO 1.0 Schema

1 Schema for AKOMA NTOSO 1.0

introduces and explains the schema for AKOMA NTOSO

2 Namespaces

AKOMA NTOSO 1.0 documents are completely qualified

3 Schema overview

All AKOMA NTOSO documents share ...

4 Patterns

abstraction and distillation of past experiences ...

5 Elements

supports the idea of using semantically rich terms

6 Document URIs

all resources are identified by a unique name

7 Element Synopsis

Elements of AKOMA NTOSO

8 Attribute Synopsis

Synopsis table

9 Stylesheets

example stylesheet for generating XHTML files

10 Release History

differences between releases

example stylesheet for generating XHTML files

The current release of AKOMA NTOSO 1.0 also includes an example stylesheet for generating XHTML files out of AKOMA NTOSO XML documents. This stylesheet is not usable anymore and needs to be updated to the current version of the standard. The stylesheet can be used both server-side (within a Perl, PHP, ASP, Java, or Python application) and client-side (delivering to the requesting browsers the XML file containing the stylesheet URL, as in the examples proposed here). The stylesheet has been successfully tested on the following browsers:

  • Internet Explorer v. 6.0.2 SP1 for Windows XP
  • Mozilla Firefox v. 1.0.7 for Windows XP
  • Mozilla Firefox v. 1.5 for Macintosh OS X
  • Apple Safari v. 1.3.1 for Macintosh OS X.

The XSLT stylesheet proposed here is an initial example, incomplete and graphically non sophisticated. Yet, it shows a few approaches that can be used fruitfully for final stylesheets, as they automatically manage the variability in element names and local habits that will be found in real-life African-wide implementations.

The proposed stylesheet exploits content model patterns systematically, radically reducing the length (and therefore the complexity) of the stylesheet. Thus, rather than having a template for each individual AKOMA NTOSO element, we have a template for every content model pattern of the schema: hierarchical structures, containers, blocks, inlines, markers. A special template is also provided for elements drawn from the HTML language that simply converts the element into its HTML correspondent.

Variability in presentation is handled by systematically adding a specific CSS class that can be exploited for presentational differences. Variability in structuring is handled by means of DTD entities within the XSLT stylesheet itself. This is a sufficiently unusual approach as to deserve a more detailed explanation.

Some elements may require transformations that depend on the actual African country that uses it. For instance, the same element may have a different hierarchical level in different countries, and thus require different presentation characteristics. We have identified a few examples of such variability:

  • The window title: what part of the document is to be used in the window title (and therefore is stored by bookmarks and search engines).
  • The overall layout: document with a strong hierarchical structure may require a navigation aid in the form of a table of content always available on a side bar. Other documents can just be drawn as a long and continuous single column.
  • The presentation of the hierarchy: the beginning of each subsection depends on the relative importance: for instance, a major section will be shown by separating in different lines the number, the heading, and the content (which we term the N-T-C presentation, where N, C and T represent number, heading and content, respectively, and the dash refers to the existence of a line break), or place on the same line the number and the heading, and on a further line the content (the NT-C presentation), other may lack the number and present the number close to the content (the NC presentation). And other may lack numbers and just have on separated lines the heading and the content (the T-C presentation).
  • The content of the table of content: usually, the table of content only contains the first few levels of the hierarchy. Not all hierarchy levels thus need to end in the automatic table of content.

Since the list of element names that impact on the above-mentioned may vary from country to country, and need to be detailed in several places of the XSLT stylesheet, the DTD entity approach has been taken: the templates actually just contains a reference to an entity, and at the beginning of the stylesheet the definition of such entities is provided. By just changing these definition, it is possible to immediately and automatically update the whole presentation according to the local presentation rules, without modifying the whole stylesheet.

Customizing the styles.css CSS stylesheet is also appropriate to obtain a fully customized presentation of AKOMA NTOSO documents.