[tei-council] extraordinary rendition

Conal Tuohy Conal.Tuohy at vuw.ac.nz
Fri Oct 26 18:52:08 EDT 2007


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


More information about the tei-council mailing list