[tei-council] Styling of TEI <ident> in HTML Guidelines

David Sewell dsewell at virginia.edu
Wed Jan 2 23:09:19 EST 2008


Based on the current stylesheets, TEI <ident> in the Guidelines is 
output as HTML <strong> when it has no @type attribute, otherwise the 
transform is

         <span class="ident-{@type}">
           <xsl:apply-templates/>
         </span>

Problem is, the current CSS doesn't handle any of the resulting
hyphenated ident classes. Here is a list of all of them in use:

   ident
   ident-class
   ident-datatype
   ident-feature
   ident-file
   ident-frag
   ident-ge
   ident-kw
   ident-macro
   ident-model.ptrLike
   ident-module
   ident-ns
   ident-pe
   ident-rng
   ident-schema
   ident-schemafrag
   ident-var

Is it safe to assume that all of these identifiers would make sense in 
HTML presented as boldface? If so, we can use a CSS 2.0 attribute 
selection rule to accomplish that:

   span[class|=ident]  {
       font-weight: bold;
   }

Firefox and Safari support this. The alternative is a tedious
hand-listing of all of those class values in the CSS, or living
with phrases like

   the module tei described in the present chapter

where the unemphasized "tei" is rather odd.

I'd like to propose that we simply modify P5/odd.css, changing

   span.ident  {
       font-weight: bold;
   }

to the rule above. It may not work with Internet Explorer, but
that just means MSIE users get status quo.

David

-- 
David Sewell, Editorial and Technical Manager
Electronic Imprint, The University of Virginia Press
PO Box 400318, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsewell at virginia.edu   Tel: +1 434 924 9973
Web: http://www.ei.virginia.edu/


More information about the tei-council mailing list