Quote:
Originally Posted by Gudy
Or are there ways to denote poems, epigraphs, citations, etc. semantically in xhtml? If not, the internal format should probably be closer to something like FB2, except perhaps richer.
|
kovidgoyal already hit this one, but I'll kick it up another notch. XHTML already
is already semantic. The <h1/> tag doesn't mean “large bold font with surrounding vertical whitespace,” it means “top-level heading.” In addition to the semantic meaning of the tags themselves, XHTML allows each tag to have a “class” attribute, which may contain a whitespace-separated list of one or more class names. CSS can then be used to apply a particular style to elements with particular tag-types, wparticular classes, particular tag-class-pairs, tags and classes nested in particular order etc.
The class names used can be ad hoc and document specific, or one can develop a set of standard class names and re-useable CSS stylesheets referencing those names. The latter approach is essentially what is known as a “microformat.” With this approach a tool could define a standard set of entities like poems, epigraphs, etc., then define how it would semantically represent those in each file format it supported. With enough effort :-) such a tool could even cleanly round-trip between very different file formats.