
Jon Noring <jon@noring.name> wrote:
Lee Passey wrote:
[snip]
Well, I might do it anyway for my own edification and enjoyment (and because I think you _will_ be interested at some point in the future ;-).)
<laugh> Careful Lee, you almost sound like Bowerbird on that one (but not quite.)
The difference is that if I _do_ do it (no promises, as of right now it's just speculation) I will make it publicly available, even in an unfinished state. As a result of the discussions here on the <gloss> tag I can already see that I'm going to have to make changes to my TEI to HTML tables. Hey, it's a work in progress, and I could be wrong (I obviously have been in the recent past ;-)), [snip]
It is also useful for the proposed TEI support in OpenReader.
Y'eh think? ;-)
Some months ago I put together a couple of tables showing how HTML could be mapped to TEI-lite, and vice-versa. The goal was to create a mapping that could be used for round-tripping via XSLT; that is, a TEI-lite document could be used to create an HTML document which could then be transformed back into TEI without loss of markup. I will probably start from those tables in creating a tei.css file. They may also be useful to you in creating XSLT scripts (aka XSL style sheets). If you're interested they can be found at www.passkeysoft.com/~lee/xhtml2tei.html and www.passkeysoft.com/~lee/tei2xhtml.html.
Well, round-tripping using XSLT and direct rendering of TEI using CSS2 are two different things.
Absolutely. These kind of tables are useful in developing a CSS file in a different sort of way. If you go out to w3c.org you can find a file that is basically the style sheet for XHTML. If you had a User Agent that knew how to render XML+CSS, but which knew nothing about HTML, you could add this style sheet to an XHTML file and it would render just like in a browser. So if you know that <hi> in TEI maps to <i> in HTML, you could use the same style that <i> uses in the HTML style sheet for the <hi> element in the TEI style sheet. This purely mechanical process isn't going to give you a perfect (or perhaps even adequate) style sheet for TEI, but it will probably get you more than 50% of the way there. [snip]
My view in LIT production is to go from PG-TEI to well-structured XHTML 1.1 (which is probably what Lee means by "HTML".)
Oh, yeah. If you're going to use XSLT to transform TEI to HTML it makes absolutely no sense to output anything _other_ than XHTML 1.1. To my knowledge there are no tools that rely on structures of HTML 3.2 which are unavailable in XHTML 1.1 (except for the fact that some older browsers need a space before the slash on empty elements, e.g. <hr />). When I say HTML you can always assume I'm talking about XHTML unless I make it explicit otherwise.
Definitely Lee is right in that <p> is not the best for this purpose, and Marcello is right in that how Lee used it is incorrect. In fact, the closer I look at the above example, the more it looks like XHTML definition lists with almost an exact mapping between the two except that XHTML <dl> (analogous to TEI <list type="gloss">) cannot contain anything but <dd> <dt> pairs, while the TEI version can also contain a <head>er.
This is something that actually bothers me quite a bit about the TEI implementation of lists. As a programmer, I want a definition list (of which a glossary is a specific instance) to be structured in such a way that I can grab _one_ element and get both the term _and_ the associated definition. I really dislike both the HTML and the TEI implementation where it relies on the definition to be in a separate element from the term, but immediately following it. The two elements are obviously inextricably linked, but the vocabularies require the encoder to make the link explicit if it is to exist at all. If I ruled the world, the term and its gloss would be combined into an item element, as follows (example modified from the sample at http://www.tei-c.org/P4X/CO.html#COLI): <list type="gloss"> <head>Unit Three --Vocabulary</head> <item> <term lang="la">acerbus, -a, -um</term> <gloss>bitter, harsh</gloss> </item> <item> <term lang="la">ager, agrī, M.</term> <gloss>field</gloss> </item> <item> <term lang="la">audiō, -īre, -īvī, -ītus</term> <gloss>hear, listen (to)</gloss> </item> <!-- etc. --> </list> I believe that this implementation of a glossary list would pass the scrutiny of a XML validator, but it is nonetheless incorrect as the TEI spec clearly states that "it is a semantic error for a list tagged with type='gloss' not to have labels." Heck, I dislike the TEI implementation of glossary lists so much that I am tempted to suggest using lists of type "glossary" instead of type "gloss" just to avoid the specification's requirements (which, by the way, an XML validator would not catch. Validators can tell you when you've done something wrong, but not when you've failed to do something right).
In fact, as I look at it, getting the example above to work in XHTML is problematic because of the <head> line. In fact, XHTML has pretty poor list support for internal headers and the like (all the lists: ol, ul, and dl, only support li, and dd/dt for dl), so this looks like item #6 in my "problems with TEI+CSS2 rendering" list.
Not so, because the problem is one of mapping between TEI and XHTML, not one of rendering TEI with CSS; although you could certainly add it to your "problems with transforming TEI to XHTML" list. CSS can deal with headers inside of lists without problem, it's HTML that has the problem.
Jon