Style Sheet Support for Hypermedia Documents

Jacco van Ossenbruggen Lynda Hardman Lloyd Rutledge Anton Eliëns
Vrije Universiteit CWI CWI Vrije Universiteit
De Boelelaan 1081a P.O. Box 94079 P.O. Box 94079 De Boelelaan 1081a
1081 HV Amsterdam 1090 GB Amsterdam 1090 GB Amsterdam 1081 HV Amsterdam
The Netherlands The Netherlands The Netherlands The Netherlands
jrvosse@cs.vu.nl lynda@cwi.nl lloyd@cwi.nl eliens@cs.vu.nl

Abstract:

Hypermedia documents are most often created with a particular presentation environment in mind. This requires the authoring of one document per presentation platform. As pointed out in [3], much implementation effort can be avoided by specifying how the same underlying document can be presented in different environments. A style sheet defines a mapping from a source document to a presentation for it. We discuss the existing use of style sheets as applied to text and discuss their application to the case of hypermedia, and in particular how they need to be extended.

KEYWORDS:

Style sheets, temporal specifications, structural transformations

INTRODUCTION

From an abstract point of view, style sheets specify the mapping of a model describing the logical structure of the document onto an output model. The output model may also be a logical structure model, or may describe a presentation structure. For page-based documents (e.g. traditional print or HTML) a clear abstraction of such a presentation structure has been developed. The Document Style Semantics and Specification Language (DSSSL [1]), for example, uses an output model based on a sequence of pages, consisting of columns, headers and footers, etc. This abstraction allows the specification of style sheets which map a variety of logical document models (including encyclopedia, novels, articles and letters) onto the same presentation structure.

Style sheets for traditional printed documents associate individual document structures with presentation attributes of the medium such as font type, character style and font size, and also describe aspects inherent to the presentation structure, such as page size, margins and headers. Work has been carried out on style sheets for HTML documents on the World Wide Web. The Web's Cascading Style Sheet mechanism (CSS1 [2]) allows for application of multiple style sheets on the same document. E.g. a user may choose to partially override the default style sheet provided by the author of an HTML page. HTML is an extension of text including anchors and links, and as such CSS1 extends the style sheet options to include the visual styles of anchors.

In order to take style definitions further for application to hypermedia we need to include not only the anchor and linking aspects of hypertext, but also the structural and scheduling aspects of multimedia. The most important of these is the temporal specification of the document, given that spatial aspects have been partially addressed for the text case in terms of pages.

To illustrate possible uses of a hypermedia style sheet we present a simple scenario. A document describing a slide show as an ordered collection of slides may be presented in several ways. For example, each slide can be presented for a fixed time interval (e.g. 10 seconds). Here the style sheet need only associate a duration with each slide. An alternative manner of presentation is that the slide is left on display until the user selects a link to the following slide. Here the style sheet has to specify the addition of a hyperlink for each slide plus some means of activating the link, for example introducing a ``next'' text button. For a more advanced audience the author may wish that a number of slides are skipped, or the ordering changed. The style sheet would specify the structural changes and the output document could then be given presentation characteristics by either of the previous two style sheets.

STYLE SHEETS FOR HYPERMEDIA DOCUMENTS

To generate a presentation, a mapping from a hypermedia document onto a presentation needs to be specified. This mapping includes the specification of media specific characteristics, anchor presentation properties, structural transformations, temporal and spatial alignment, and environment characteristics.

In our view one of the interesting aspects of this conversion describes the precise temporal scheduling of the media items. In more adaptive systems, this conversion might also include information about how to adapt to user characteristics (e.g. level of expertise) or changing system resources (e.g. network bandwidth). The hypermedia style sheet could be used to indicate how to deal with a limited amount of resources (by specifying alternatives or QoS negotiation protocols) on different platforms, making the document source independent of platform specific details.

Another important aspect we wish to emphasize is the use of style sheets for structural conversions. Apart from the examples sketched in the above scenario, such conversions could include automatic generation of an index or table of contents.

A hypermedia style sheet language must combine a powerful query language with a sufficiently rich model of the presentation environment. A style sheet must be able to query both the document structure as well as (parts of) the individual media components in the source document. The presentation environment model needs to include the aspects mentioned above: media specific characteristics, possible anchor visualizations, and allowable temporal and spatial alignments. CSS1 [2] does not qualify as a hypermedia style sheet langage because it does not support structural transformations. Additionally, since temporal structures are absent in HTML, these are also not accounted for. DSSSL [1], however, is a better candidate since it features both a powerful query language and a language to express structural transformations on hierarchically structured documents. However, its two dimensional (page-based) presentation model cannot deal with complex spatial alignments, and is completely unable to deal with temporal scheduling. DSSSL does not offer a standardized mechanism to combine several style sheets as is done by CSS1.

CONCLUSIONS

Style sheets are already a standard feature of text processing systems. While some style sheet languages focus on specific presentation details (e.g. font size), other style sheet languages such as DSSSL are also able to perform structural transformations. For hypermedia systems to benefit from the use of style sheets, hypermedia documents should encode the logical structure of the presentation while a separate hypermedia style sheet defines the mapping from the document structure to a final presentation format. The expressive power of current style sheet languages is insufficient to encode the temporal and structural characteristics of hypermedia documents and so we propose a list of features which need to be included in such a language.

References

1
International Organization for Standardization/International Electrotechnical Commission. Information technology -- Processing languages -- Document Style Semantics and Specification Language (DSSSL), 1996. International Standard ISO/IEC 10179:1996.

2
Håkon W. Lie and Bert Bos. Cascading Style Sheets, level 1, November 1996. W3C Proposed Recommendation; Available at http://www.w3.org/pub/WWW/TR/.

3
D. Schwabe, G. Rossi, and S.D.J. Barbosa. Systematic Application design with OOHDM. In Seventh ACM Conference on Hypertext (Hypertext '96) Washington DC, March 16-20 1996, pages 116-128, 1996.