att.global.rendition

att.global.rendition provides rendering attributes common to all elements in the TEI encoding scheme. [1.3.1.1.3. Rendition Indicators]
Module tei
Members att.global [NB TEI ab abbr abstract activity add addName additional address adminInfo affiliation am att author bibl biblStruct body byline catDesc catRef category cell change char charDecl choice cit closer code collection compliment corr correspAction correspContext correspDesc creation custodialHist damage dateline del desc div divGen docAuthor docDate docEdition docImprint docTitle editor egXML ellipsis emph enclosure encodingDesc epigraph expan extent facsimile figDesc figure fileDesc floruit foreign forename front fw g gap genName geo gi gloss graphic handNote handNotes handShift head hi history idno imprimatur imprint item l label langKnown langUsage language lb lg linkGrp list listBibl listChange listObject listOrg listPerson listPlace listPrefixDef localProp location locusGrp mapping measure measureGrp mentioned metamark milestone msContents msDesc msIdentifier msItem msName msPart name nameLink note noteGrp notesStmt num objectDesc objectName occupation opener org orgName orig origin p persName person persona physDesc place placeName postscript prefixDef profileDesc projectDesc ptr pubPlace publicationStmt publisher quote ref reg rendition repository request resp respStmt revisionDesc roleName row rs salute setting settingDesc settlement sic signed soCalled sourceDesc sp speaker standOff subst summary supportDesc surface surfaceGrp surname surplus surrogates table tag tagsDecl taxonomy teiHeader term text textClass title titlePage titlePart titleStmt trailer unclear val w zone] date time
Attributes
style contains an expression in some formal style definition language which defines the rendering or presentation used for this element in the source text
Status Optional
Datatype teidata.text

<head style="text-align: center; font-variant: small-caps">
   
<lb/>To The <lb/>Duchesse <lb/>of <lb/>Newcastle, <lb/>On Her
           
<lb/>
   
<hi style="font-variant: normal">New Blazing-World</hi></head>
Note
Unlike the attribute values of rend, which uses whitespace as a separator, the style attribute may contain whitespace. This attribute is intended for recording inline stylistic information concerning the source, not any particular output.
The formal language in which values for this attribute are expressed may be specified using the styleDefDecl element in the TEI header.
If style and rendition are both present on an element, then style overrides or complements rendition. style should not be used in conjunction with rend, because the latter does not employ a formal style definition language.
rendition points to a description of the rendering or presentation used for this element in the source text.
Status Optional
Datatype 1–∞ occurrences of teidata.pointer separated by whitespace
Schematron The two column layout requires one item to be left and one item to be right.
<sch:rule context="tei:*[contains-token(@rendition,'rnd:two-column')]"> <sch:let name="children"  value="child::tei:*"/> <sch:let name="leftChild"  value="$children[contains-token(@rendition,'rnd:left')]"/> <sch:let name="rightChild"  value="$children[contains-token(@rendition, 'rnd:right')]"/> <sch:assert test="exists($children) and (count(($leftChild, $rightChild)) = count($children))">ERROR: Every child of a two column layout must have either a rnd:right or a rnd:left rendition value.</sch:assert> <sch:assert test="exists($leftChild) and exists($rightChild)">ERROR: There must be at least one rnd:left and one rnd:right child</sch:assert> </sch:rule>
Schematron Some renditions contradict each other
<sch:rule context="tei:*[@rendition]"> <sch:let name="rendition"  value="@rendition"/> <sch:let name="ptrs"  value="tokenize(@rendition,'\s+')"/> <sch:let name="tokens"  value="for $p in $ptrs return substring-after($p,'rnd:')"/> <sch:let name="duplicates"  value="$tokens[count(index-of($tokens, .)) gt 1]"/> <sch:assert test="empty($duplicates)">ERROR: Duplicate renditions found: <sch:value-of select="string-join($duplicates,', ')"/>. Do not use the same rendition more than once on a single element.</sch:assert> <sch:assert test="count($tokens[. = ('left','right','center')]) lt 2">ERROR: rnd:right, rnd:left, or rnd:center are mutually exclusive.</sch:assert> <sch:assert test="count($tokens[. = ('large','small')]) lt 2">ERROR: rnd:large and rnd:small are mutually exclusive.</sch:assert> <sch:assert test="count($tokens[. = ('bordered-bottom','bordered-bottom-dashed')]) lt 2">ERROR: rnd:bordered-bottom and rnd:bordered-bottom-dashed are mutually exclusive.</sch:assert> </sch:rule>
Legal values are:

<head rendition="#ac #sc">
   
<lb/>To The <lb/>Duchesse <lb/>of <lb/>Newcastle, <lb/>On Her
           
<lb/>
   
<hi rendition="#normal">New Blazing-World</hi></head>
<!-- elsewhere... -->
<rendition xml:id="sc" scheme="css">font-variant: small-caps</rendition>
<rendition xml:id="normal" scheme="css">font-variant: normal</rendition>
<rendition xml:id="ac" scheme="css">text-align: center</rendition>
Note
The rendition attribute is used in a very similar way to the class attribute defined for XHTML but with the important distinction that its function is to describe the appearance of the source text, not necessarily to determine how that text should be presented on screen or paper.
If rendition is used to refer to a style definition in a formal language like CSS, it is recommended that it not be used in conjunction with rend. Where both rendition and rend are supplied, the latter is understood to override or complement the former.
Each URI provided should indicate a rendition element defining the intended rendition in terms of some appropriate style language, as indicated by the scheme attribute.
Schematron
Constraints for renditions that should only be used in born digital documents

<sch:rule context="tei:*[contains-token(@rendition,'rnd:hidden')]">
   
<sch:assert test="self::tei:head and ancestor::tei:TEI/descendant::tei:catRef[matches(@target,'bornDigital')]">ERROR: rnd:hidden is meant only for born digital document headings.</sch:assert>
</sch:rule>
The two column layout requires one item to be left and one item to be right.

<sch:rule context="tei:*[contains-token(@rendition,'rnd:two-column')]">
   
<sch:let name="children" value="child::tei:*"/>
   
<sch:let name="leftChild" value="$children[contains-token(@rendition,'rnd:left')]"/>
   
<sch:let name="rightChild" value="$children[contains-token(@rendition, 'rnd:right')]"/>
   
<sch:assert test="exists($children) and (count(($leftChild, $rightChild)) = count($children))">ERROR: Every child of a two column layout must have either a rnd:right or a rnd:left rendition value.</sch:assert>
   
<sch:assert test="exists($leftChild) and exists($rightChild)">ERROR: There must be at least one rnd:left and one rnd:right child</sch:assert>
</sch:rule>
Some renditions contradict each other

<sch:rule context="tei:*[@rendition]">
   
<sch:let name="rendition" value="@rendition"/>
   
<sch:let name="ptrs" value="tokenize(@rendition,'\s+')"/>
   
<sch:let name="tokens" value="for $p in $ptrs return substring-after($p,'rnd:')"/>
   
<sch:let name="duplicates" value="$tokens[count(index-of($tokens, .)) gt 1]"/>
   
<sch:assert test="empty($duplicates)">ERROR: Duplicate renditions found:<sch:value-of select="string-join($duplicates,', ')"/>. Do not use the same rendition more than once on a single element.</sch:assert>
   
<sch:assert test="count($tokens[. = ('left','right','center')]) lt 2">ERROR: rnd:right, rnd:left, or rnd:center are mutually exclusive.</sch:assert>
   
<sch:assert test="count($tokens[. = ('large','small')]) lt 2">ERROR: rnd:large and rnd:small are mutually exclusive.</sch:assert>
   
<sch:assert test="count($tokens[. = ('bordered-bottom','bordered-bottom-dashed')]) lt 2">ERROR: rnd:bordered-bottom and rnd:bordered-bottom-dashed are mutually exclusive.</sch:assert>
</sch:rule>
Source Github

<classSpec rend="change" predeclare="true" module="tei" type="atts" ident="att.global.rendition">
   
<desc>provides rendering attributes common to all elements in the TEI encoding scheme.</desc>
   
<classes/>
   
<attList>
      
<attDef ident="style" usage="opt">
         
<desc>contains an expression in some formal style definition language
which defines the rendering or presentation
used for this element in the source text
</desc>
         
<datatype maxOccurs="1">
            
<dataRef key="teidata.text"/>
         
</datatype>
      
</attDef>
      
<attDef ident="rendition" usage="opt">
         
<desc>points to a description of the rendering or presentation used for this element in the
    source text.
</desc>
         
<datatype maxOccurs="unbounded">
            
<dataRef key="teidata.pointer"/>
         
</datatype>
         
<valList type="closed"/>
      
</attDef>
   
</attList>
</classSpec>