Better handling for @rendition
Posted by mholmes on 27 Sep 2013 in Activity log
My hacked-together XSLT for @rendition/<rendition>
from a few weeks ago was only handling labels and notes, but we obviously need a better approach, so I've done the initial implementation. As it stands:
- Any
<rendition>
elements in the header are turned into classes in a local stylesheet. - Any elements which are already being produced with classes have rendition-based classes added to the class attribute.
- Any elements which are output without classes are processing @* (hopefully), and this triggers a template matching @rendition which creates a class attribute.
I've purposely allowed for the use of the rendition system in born-digital as well as primary source documents, mainly because there are overlapping templates so it's hard to distinguish which context you're in half the time, but I don't want or expect rendition to be used on born-digitals; if it is, then something is probably not right with the encoding.