
As threatened, I have started preparing a CSS file that will allow TEI files, at least PG-TEI files, to be displayed natively in a web browser. I started with html4.css, which can be found on the w3c web site, and which purports to be a style sheet reflecting the prevailing implementation of HTML styles by common web browsers. I began replacing HTML tags with their more-or-less-corresponding TEI tags, and continued by tweaking the actual styles associated with them, principally by replacing absolute sizes (e.g. 1.17) with relative sizes (e.g. 125%). By the time I got done, there was virtually nothing left of the original HTML styles. The principal work in creating the style sheet was in determining which TEI tags suggested a block presentation, which tags suggested an inline presentation, and which tags are primarily "metadataish" and which should not be displayed at all (but which are useful, if not essential, for creating catalogs). Most of the tags fell easily into one of these three categories (ignoring, for the moment, tables) but some are somewhat ambiguous; I made a judgement call with these tags, recognizing that someone else's judgment is probably equally valid. Of particular interest are quotations. TEI has two tags for quotations, one apparently for long quotations (<quote>) and one apparently for short quotations, (<q>). I opted to treat <quote> as block-level tags (similar to the HTML <blockquote>) and <q> as inline (similar to the HTML <q>). To test the CSS file, I grabbed Mr. Perathoner's version of _Alice in Wonderland_ from http://www.gutenberg.org/tei/marcello/0.3/examples/alice/, and added an 'xml-stylesheet' declaration including 'pgtei.css'. There were a few constructs in the file which needed styling, so I also created a document-specific CSS file (alice.css) and linked to that as well. While Mr. Perathoner's version of _Alice_ has a fairly complete <teiHeader> section, it did not have a title page; in my pgtei.css file I set <teiHeader> to "display:none", and added a <titlePage> to the file. I also fixed a small number of abuses of the <p> tag, and changed the tag for block-style quotations from <q> to <quote>. The resulting file can be found at http://www.passkeysoft.com/~lee/alice.xml. The resulting XML+CSS renders quite nicely in both Opera 7.4 and Firefox 1.0.4. It does _not_ render quite so well in Internet Explorer 6.0.29. Apparently IE does not support the CSS :before or :after pseudo-selectors, causing the file to lose quotation marks, nor does it correctly interpret the *[attribute~="value"] syntax, making such markup as 'rend="italic"' or 'rend="center"' inoperative. The biggest obstacle remains how to make the images appear; I haven't yet found anything in the CSS spec that will permit this. The CSS file can be found at http://www.passkeysoft.com/~lee/pgtei.css. Comments are solicited.