4 Markup languages


4.1 Procedural vs. Descriptive Markup

  • Procedural (HTML): Visual, typographic, representation; WYSWYG: What You See is ALL you Get.
<bold>Miguel de Cervantes</bold> wrote <italic>Don Quixote</italic>
  • Descriptive (XML): Markup Semantic, funcional, structured; Meaning before format.
<name>Miguel de Cervantes</name> wrote <title>Don Quixote</title>

4.2 XML Golden Rules

XML Element terminology:

<tag attribute="value">data</tag>
  • An element consists of a start-tag, optional content, and an end-tag
<persName>Miguel de Cervantes</persName>
  • An element may have attributes, each consisting of a name and a value.
<name type="person">Miguel de Cervantes</name>
  • An XML document may contain processing instructions or comments
<?xml-stylesheet type="text/css" href="visualize-tei-xml.css"?>
<!-- This is a comment: here starts the first sonnet -->
  • Elements and attributes are case sensitive.
<name> != <Name>
  • Empty elements can use a minimized tag syntax.
<pb/> = <pb></pb>

4.2.1 No overlapping

  ├── TEI
    ├── teiHeader
      ├── fileDesc
      ├── encodingDesc
    ├── text
      ├── front
      ├── body
        ├── head
        ├── div  
      ├── back

4.3 Text Encoding Initiative: TEI

  • Development of markup for texts;
  • International standard;
  • Interchange of data;
  • Platform independence;
  • Preservation;
  • Research community.

TEI Consortium and Guidelines: https://tei-c.org