[tei-council] extraordinary rendition

John A. Walsh jawalsh at indiana.edu
Sat Oct 27 00:20:55 EDT 2007


Christian and Conal have both made excellent points.

The <rendition> elements should not be restricted to a single 
property/value, but, like a CSS class, have as many as needed to 
describe a particular rendition style.

As Conal points out, the <rendition> elements could be easily 
transformed into an external CSS style sheet.  @rend now is more likely 
to be transformed into an  html @style attribute, if one is using CSS 
syntax in @rend.

John
--
| John A. Walsh
| Assistant Professor, School of Library and Information Science
| Indiana University, 1320 East Tenth Street, Bloomington, IN 47405
| www: <http://www.slis.indiana.edu/faculty/jawalsh/>
| Voice:812-855-8758 Fax:812-856-2062 <mailto:jawalsh at indiana.edu>


Quoting Conal Tuohy <Conal.Tuohy at vuw.ac.nz>:

> Sebastian Rahtz wrote:
>
>> Thanks to the kind people at Schonefeld Airport who
>> left electricity running from a socket in departures,
>> I have been able to implement @rendition in my TEI to HTML
>> stylesheets.
>
> Yay!
>
>> In the rule
>
>    <rendition xml:id="small" scheme="css">font-size: small;</rendition>
>
>> do we say that this should contain one property/value and one
>> property/value only?
>> in which case, is the ";" necessary? should I not be supplying that myself
>> in my XSL? it would make the stuff easier to implement in other languages,
>> possibly.
>
> I think it would very often be useful to bundle up several
> property/value pairs into a single rendition. For instance, a
> font-family, font-weight, font-size, etc, could be treated as a
> single rendition specifying a particular font.
>
> In which case, when concatenating the CSS of several renditions, you
> would have to insert semi-colons between each rendition (and I guess
> strip off trailing semi-colons encoded in the rendition elements).
>
>> Secondly, I hope we realize that the effect
>> is sometimes to generate rather horrible HTML?
>> ie with inline @style attribute.
>> this _is_what is intended? I say this because I
>> cannot always generate a <style>
>> component at the top of the file to reference, because the
>> @rendition may point to a remote file, which
>> may not yield me a useful identifier.
>
> Not really sure I understand this. I assume you are using the XPath
> document() function to load renditions from a remote file, but I
> don't quite see how this requires an identifier. Do you mean you need
> to generate some token from the value of the @rendition - something
> that can be used as a @class value for the HTML? If so, maybe you
> could use a key to group identical values of @rendition, and use
> generate-id() on the first element of the group. e.g.
>
> <xsl:key name="rendition-refs" match="@rendition" use="."/>
> <xsl:template match="@rendition" mode="class">
>    <xsl:text>rendition-</xsl:text>
>    <xsl:value-of select="generate-id(key('rendition-refs', .)[1])"/>
> </xsl:template>
>
> Cheers
>
> Con
> _______________________________________________
> tei-council mailing list
> tei-council at lists.village.Virginia.EDU
> http://lists.village.Virginia.EDU/mailman/listinfo/tei-council
>





More information about the tei-council mailing list