Main Menu Powered by <TEI:TOK> |
TEITOK Help PagesStyling TEI/XML filesMost web pages that are based on XML documents convert the XML files to HTML before displaying them. This is either done beforehand, or on-the-fly using XSLT. TEITOK works differently: it embeds the XML directly into the HTML page, creating a blend of XHTML and TEI/XML. It does this since many of the display options use information from the TEI/XML file, that would not be available when converted to HTML. All embedded TEI/XML is located inside an HTML element with the xml-id "mtxt", and how that XML fragment is visualized is defined in CSS style file. So text inside a TEI element
This CSS command tells the browser to display any
Default styles are provided in a file Symbol-based renderingTraditionally, much linguistic mark-up was done using special symbols - so for instance, in spoken corpora, truncated words
were often followed by a & sign to indicate the word was truncated:
This will put a pseudo-element after any This provides a very convenient way to display mark-up in a way that is familiar to the target audience, but where the symbol-based
mark-up is generated by the computer, and hence does not interfere with the text. However, there is a small complication: when the
content of the deleted element is suppressed, which is what by default happens in the @form view, the pseudo-element is not suppressed,
meaning the & will stay as a ghost element. This is not something that can be solved in CSS, and hence TEITOK provides a Javascript
solution that can be used in CSS: when changing views, any token that no longer has any content is adorned with an attribute
View-specific stylingThere are situations in which certain mark-up should only be displayed in specific text views. For instance, in the COPLE2 corpus,
there are indications of the corrections made by the teacher in student essays. These corrections should be shown in the
transcription view, but not in any other. Again, this is not something that can be handled directly in CSS, and TEITOK provides
a Javascript-based handle: when switching the text-view, the new text view is set as an attribute on the #mtxt element. So when
switching to @pform (the raw XML view), the #mtxt element will be set to
Back to index |