PT> Is there any agreed upon way to use the rend attribute?
Years ago the WWP developed a system, which was never completely
finished, for specifying renditions on the TEI rend= attribute. The
basic idea was to cram information into the attribute using the
keyword1 ( args1 ) keyword2 ( args2 ) ... keywordN (argsN )
syntax. While I think it was a good idea at the time, and I think the
system was, as far as it went, reasonably well developed, I think the
advantages to that particular syntax are no longer applicable.
This system, called "rendition ladders", has been partially
implemented by 2 or 3 SGML systems that, to my knowledge, are no
longer used today.
If anyone's interested I can see if I can dig up the poster session
from SGML '96 or the specification document.
JC> [Use rend="style7" translated to class="style7" and render w/
JC> CSS]
Overall, I think James is completely correct, but with caveats -- see
below.
SR> rend="xxx()"
There are some definite advantages, but also some drawbacks. Mostly
that you need a system for representing a close-parenthesis inside
the parenthesized value. (At least in DTD land, neither ) nor
) will do, as both are converted to ")" before being handed to
the application.)
(I vaguely remember chatting about this idea with someone once, but I
don't think it was you, Sebastian, was it?)
DS> There are actually cases where in order to describe the rendering
DS> of the text being encoded, CSS syntax may be the most economical
Absolutely ... but that doesn't mean that there aren't enormous
advantages to the indirection James has suggested, even when
economical CSS is used as the end language to describe rendition.
Seems to me that in some sense this is the old "procedural vs.
descriptive" markup discussion all over again. Indicating *what* a
segment of text *is*, rather than what to do with it gives you
tremendous purchase on your text that you just don't get when you say
what to do with a piece of text. It's still the case that
<quote>
is more powerful than
.sk 1;.in +2 -2;.ss
even if it's
rend="quote"
instead of
margin-top: 1 em; padding-right 2ex; padding-left 2ex; line-height: 100%;
DS> If there are three tables in a book that each have a different
DS> appearance and heterogenous internal formats, it could make more
DS> sense to describe them using local CSS for each component than by
DS> inventing ad hoc rendering class labels to apply to them.
Also absolutely true. The indirection required to gain the extra
power of description requires effort; the payoff is largest when
there are lots and lots of things that fit into the same descriptive
categories. So when there are few enough occurrences of those
categories and enough extra work for the indirection, it may not pay
off. So there is a line to be drawn between those one-off cases where
the extra effort is not worth it, and those "single input, multiple
output" of multiple texts where the extra effort is obviously
important. My experience is that people usually draw that line too
far over such that more falls onto the "one-off" side than should,
and they often end up regretting not having put the effort into
descriptive markup.
DO> I like this solution a lot, as it allows an infinitely expanded
DO> standardised style vocabulary: XSLFO(...) for things that are
DO> explainable in that language
Indeed, in some sense it is a language we're talking about. I have in
the past suggested something like the following (translated to P5-ish
syntax :-)
<tagsDecl>
<rendition xml:id="rQUOTE" xml:lang="x-css2">
margin-top: 1 em;
padding-right 2ex;
padding-left 2ex;
line-height: 100%;
</rendition>
<tagUsage gi="quote" render="rQUOTE"/>
<!-- ... -->
</tagsDecl>
<!-- ... -->
<langUsage>
<language ident="x-css2">
<ref target="http://www.w3.org/TR/REC-CSS2">Cascading Style Sheets, level 2</ref>
</language>
</langUsage>
I'm not suggesting this is the right way to do this, but it is an
interesting thought experiment.
CT> As part of a "print-on-demand" experiment @ NZETC we formatted a
CT> TEI doc in CSS, but we used the rend attribute to identify
CT> formatting classes, rather than inline styles (equivalent of html
CT> @class rather than @style). e.g.
CT> <p rend="h2">text</p>
CT> I learnt that there was in fact an existing mechanism for
CT> embedding such a stylesheet in TEI - the tagsDecl element. Inside
CT> a tagsDecl you can actually document the vocabulary you've used
CT> in your @rend attributes throughout the document, and what better
CT> way than using CSS? :-)
CT> <rendition id="h2">
CT> font-size: 16pt;
CT> font-weight: bold;
CT> text-align: center;
CT> padding-top: 12mm;
CT> padding-bottom: 5mm;
CT> </rendition>
Hmmm... I don't think this is exactly what the Guidelines intend
(although something like it wouldn't necessarily be a bad idea). On
the other hand, it seems like an exaggeration to call this "tag
abuse". No element is being misused ... it's just that using rend= as
a reference (might be declared as an IDREF in P4) to a <rendition> is
not a documented use of it.
|