[sword-devel] OSIS formatting

DM Smith dmsmith555 at yahoo.com
Thu Jun 16 14:12:48 MST 2005


Greg Hellings wrote:

> DM,
>          You are correct.  When the style="" tag is omitted, and the 
> various classes that Troy pointed out are used, then most of the 
> formatting that can be done with ThML can also be done with OSIS.  
> However, the fact remains that since ThML is built off of HTML, the 
> importers for Sword accept the style="" tag from a ThML-encoded file.  
> However, they do not accept that attribute if the input is OSIS. 

In the HTML world, the move is away from the style element and toward 
the class attribute. And away from tables for layout toward CSS 
placement for divs, spans and other elements. The goal is to separate 
content from presentation and to supply sufficient markup to content 
that it can be styled externally.

OSIS has a two attributes that are comparable to class: type and 
subtype. These can easily be used by xslt to create html class attributes.

> I have been using Bibletime to display highly formatted texts which 
> include colored fonts, backgrounds, borders, table spacing and widths, 
> etc and when the information is encoded with ThML and style="" tags 
> containing a very wide range of CSS then the formatting is preserved 
> beautifully.  It is all completely ignored by Bibletime if the input 
> is OSIS.

I think that this is the best argument for OSIS.

>          That said, I appreciate most of the formatting that can be 
> done with CSS.  It allows for a much larger range of display 
> characteristics than OSIS's very small selection of text-only 
> formatting.  If Bibletime and/or Sword would accept CSS formatting 
> from a style="" tag in OSIS, then my problems would mysteriously 
> vanish into thin air, but for the time being the wider range of 
> ThML-allowed formatting thrrough the availability of CSS has 
> influenced my choice of formatting to be ThML.

Again, I think that class should be used instead of style and that OSIS 
has a mechanism which is comparable.

> As an alternative, Sword might allow a user-defined XSL or even CSS to 
> be specified with each module to define formatting on a per-module 
> basis so that the distinction between data and presentation (which is 
> inherent to XML's purpose) may be maintained.

I think that this is a great idea. At least as a starting point. Each 
delivery system will need to style the document to its own rendering 
engine. The advantage of a stylesheet is that it would define all of the 
module writer's intentions regarding the "class" attribute (or 
type/subtype in OSIS.)

> --Greg



More information about the sword-devel mailing list