Print

Print


Hi Martin and all,

I can't really see any pseudo-classes which would be strictly necessary 
on a per-element level, at least to indicate /original/ formatting, 
though I guess it wouldn't hurt to allow them.

By the way, I had forgotten there is already a CSS quotes property. 
Also, this CSS3 spec draft is very interesting: 
http://www.w3.org/TR/css3-content/

As far as stylesheets, while they may not strictly be necessary, by 
using global selectors, it can avoid a lot of duplication (though it 
makes it more difficult to do something (without scripting) like allow 
document consumers to search only for specific text that is in italics, 
as the user may have remembered it as such without knowing its element 
type).

As far as xml-stylesheet though, I think, as it is sometimes hard to do, 
it should always be kept in mind that the styling information within a 
TEI document is referring to the formatting of the original. Use of 
xml-stylesheet, while allowable in XML, indicates the desired output 
formatting, as opposed to semantically indicating the original 
formatting, so it is fine to use it (at least it is guaranteed to work 
if targeting an external file), but targeting an inner style tag would, 
if it worked and is allowed in TEI, would use that formatting as output 
formatting, raising the question of whether <html:style> in TEI was also 
to indicate original formatting. Regardless, I personally agree some tag 
should exist to provide a stylesheet for the original formatting. 
Perhaps it would be best to have a different tag from <html:style> so as 
to distinguish output formatting from original formatting, if people 
wanted to include two different stylesheets within a document (probably 
not a good idea, but...), and also to make clear that this is 
semantically different than the HTML style tag which only indicates 
output formatting.

I notice, however, that in using <html:style> (in Firefox at least), 
even without xml-stylesheet, use of <html:style> actually does apply the 
styling to the document (and doesn't render the style contents). But if 
<html:style> is meant to only indicate original formatting in TEI, then 
this is a problem (at least with Firefox), since in such a case, it 
should not be used as formatting instructions without xml-stylesheet 
explicitly targeting it (in XHTML, the recommended usage per 
http://www.w3.org/TR/xhtml1/#C_14 is to specify <?xml-stylesheet?> for 
each inner style tag). It also seems like html:style should only work 
(if it works at all in plain XML documents like TEI) with items in the 
HTML namespace, but in Firefox at least, this is not the case.

Unfortunately this convention for xml-stylesheeet in XHTML (at 
http://www.w3.org/TR/xhtml1/#C_14) is not part of the spec for 
xml-stylesheet in XML (at http://www.w3.org/TR/xml-stylesheet/) (which 
might have relied on xml:id, though some hiding of the XML "style" tag 
would need to have display:none assigned (unless perhaps some element 
were allowed in the reserved xml: namespace), since all plain XML 
contents are shown by default). So, plain XML does not seem to allow any 
formal XML-spec-compliant way to specify an internal stylesheet.

When trying this in practice, however, Firefox (3.0) at least has some 
odd behavior in this connection too. For example, this doesn't work at all:

<?xml-stylesheet href="#myStylesheet" type="text/css"?>
<root>
<css xml:id="myStylesheet"><!-- same effect with or without xml:id or 
with 'id' -->
el{color:red;}
</css>
<el>abc</el>
</root>

but when put as a 2nd rule, here it does (but the first rule is ignored):

<?xml-stylesheet href="#myStylesheet" type="text/css"?>
<root>
<css xml:id="myStylesheet"> <!-- same effect with or without xml:id or 
with 'id'-->
style{display:none;}
el{color:red;}
</css>
<el>abc</el>
</root>

best wishes,
Brett