Print

Print


Hello all,

A few different responses...

On 1/15/2009 4:20 AM, Peter Boot wrote:
> CSS seems targeted at (HTML) output.
It does work fine with XML too. A common item you need to add in XML CSS 
for each element (that is already done for you with HTML) is 
"display:block;" or the like. And you cannot use CSS with XML to say 
indicate that an element should be displayed as a form control like a 
button (specific browsers may have extensions to do this though), but 
that is probably not something most people want to do with a TEI 
document anyways!

You also can't rely on the HTML-specific selectors like #someID or 
..someClass  (the former might be made to work in the future with xml:id 
(or DTD-specified ID type elements) according to the draft at 
http://www.w3.org/TR/css3-selectors/ , but I don't know of any browsers 
that support this yet). However, you can do something like say 
[rend~=someClass] to target a white-space separated "class" name in all 
@rend attributes.  I started a related wiki page on this a while back at 
http://wiki.tei-c.org/index.php/Tips_on_using_CSS_with_XML/TEI if anyone 
likes to check it out or add to it

I also like the idea of collaboratively building formatting conventions 
(just a stub started at 
http://wiki.tei-c.org/index.php/Third_party_formatting_conventions ) so 
that stylesheeets (like Sebastian's) could be codified and made to work 
off the bat for a range of documents.

As far as Peter and Greg's approach with relying on predefined values, I 
think this also has the benefit of allowing for easier overriding of 
styles in an output document. For example, although the original may 
indeed have used italics for emphasis, one republisher might wish to 
change this to underlined or bold text. It would be easier/cleaner I 
think to transform a hook as simple as rend='italic' into CSS then to 
transform specific CSS.

Although this is not about the inadequacy of CSS, I think the current 
scheme cannot support pseudo-selectors without hacks. I informally 
proposed a while back to add a @scope attribute to <rendition/> to solve 
this, for those who did want to stick with CSS (e.g., here implying the 
CSS "first-letter" pseudo-element).

<rendition xml:id="dropcaps" scope="first-letter" 
scheme="css">font-size:xx-large</rendition>
     ...
<p rendition="#dropcaps">Once upon a time...</p>

The above would also solve the current need for relying on the non-CSS 
PRE or POST convention for specifying use of different quotation marks, 
etc. (:before and :after pseudo-elements could be used under @scope in 
conjunction with the 'content' property).

<rendition xml:id="quoteBefore" scheme="css" scope="before">content: 
'"';</rendition>
<rendition xml:id="quoteAfter" scheme="css" scope="after">content: 
'"';</rendition>
     ...
<p rendition="#quoteBefore #quoteAfter">Four score and seven years 
ago...</p>


By the way, I'd love to hear any feedback on this and also on my chapter 
proposal at 
http://www.tei-c.org/Activities/Council/Working/tcw10.xml?style=printable (though 
it's been a while since I've reviewed the proposal).

best wishes,
Brett