Valid XML |
<!DOCTYPE TEI.2 PUBLIC "-//TEI//DTD TEI Lite 1.0//EN"
"../dtd/xmllite.dtd"
[
]>
email DTD |
<!ELEMENT email (header, body)> <!ELEMENT header (subj, date, from, to)> <!ELEMENT subj (#PCDATA)> <!ELEMENT date (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT to (#PCDATA)> <!ELEMENT body (open | p | ps | close | sign)*> <!ELEMENT open (#PCDATA)> <!ELEMENT p (#PCDATA)> <!ELEMENT close (#PCDATA)> <!ELEMENT ps (#PCDATA)> <!ELEMENT sign (name | address)*> <!ELEMENT name (#PCDATA)> <!ELEMENT address (addrline)+> <!ELEMENT addrline (#PCDATA)>
Validating XML |
Assignment: solution |
ERROR.XML:17:8:E: element "Funder" undefined ERROR.XML:23:46:E: end tag for element "addrline" which is not open ERROR.XML:24:12:E: document type does not allow element "addrLine" here; assuming missing "address" start-tag ERROR.XML:27:9:E: end tag for element "funder" which is not open ERROR.XML:29:11:E: end tag for "addrLine" omitted, but OMITTAG NO was specified ERROR.XML:23:3: start tag was here ERROR.XML:29:11:E: end tag for "address" omitted, but OMITTAG NO was specified ERROR.XML:19:2: start tag was here ERROR.XML:29:11:E: end tag for "Funder" omitted, but OMITTAG NO was specified ERROR.XML:17:1: start tag was here ERROR.XML:87:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:91:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:93:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:95:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:97:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:99:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:101:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:103:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:105:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:106:5:E: end tag for "head" omitted, but OMITTAG NO was specified ERROR.XML:85:0: start tag was here ERROR.XML:106:5:E: end tag for "div" which is not finished ERROR.XML:140:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:142:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:144:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:146:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:147:5:E: end tag for "p" omitted, but OMITTAG NO was specified ERROR.XML:138:0: start tag was here ERROR.XML:554:13:E: document type does not allow element "head" here; missing one of "listBibl", "figure", "list", "table" start-tag ERROR.XML:556:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:558:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:560:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:562:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:564:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:566:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:568:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:570:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:572:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:574:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:575:5:E: end tag for "head" omitted, but OMITTAG NO was specified ERROR.XML:554:8: start tag was here ERROR.XML:575:5:E: end tag for "head" omitted, but OMITTAG NO was specified ERROR.XML:554:0: start tag was here ERROR.XML:575:5:E: end tag for "div" which is not finished ERROR.XML:646:2:E: document type does not allow element "p" here; missing one of "add", "corr", "sic", "note", "figure", "q", "stage" start-tag ERROR.XML:646:38:E: end tag for "p" omitted, but OMITTAG NO was specified ERROR.XML:646:0: start tag was here ERROR.XML:646:42:E: end tag for element "p" which is not open ERROR.XML:809:10:E: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified ERROR.XML:925:6:E: end tag for element "div1" which is not open ERROR.XML:926:6:E: end tag for "div" omitted, but OMITTAG NO was specified ERROR.XML:875:0: start tag was here ERROR.XML:926:6:E: end tag for "div" omitted, but OMITTAG NO was specified ERROR.XML:503:0: start tag was here
Which can be solved in 9 steps |
3: TEI Lite: TeixLite |
Is XML too eXtensible? |
Namespaces |
Why a DTD? |
Text Encoding Initiative: a pizza model |
TEILite |
TeixLite: start |
<?xml version="1.0"?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI//DTD TEI Lite XML ver. 1//EN"
"teixlite.dtd"
[
]>
TeixLite: start |
<?xml version="1.0"?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI//DTD TEI Lite XML ver. 1//EN"
"teixlite.dtd"
[
]>
<?xml version="1.0"?> <!DOCTYPE TEI.2 PUBLIC "-//TEI//DTD TEI Lite XML ver. 1//EN" "teixlite.dtd" [ ]> <TEI.2> ... </TEI.2>
A TEI-conformant document |
<TEI.2> <teiHeader>...<teiHeader> <text>...<text> <TEI.2>
<teiHeader> |
<teiHeader> |
<teiHeader>
<fileDesc> ... </fileDesc>
<encodingDesc> ... </encodingDesc>
<profileDesc> ... </profileDesc>
<revisionDesc> ... </revisionDesc>
</teiHeader>
<teiHeader>
<fileDesc> ... </fileDesc>
</teiHeader>
<text>: A text may be unitary or composite |
<text>
<front>...</front>
<body>...</body>
<back>...</back>
</text>
<text>: A text may be unitary or composite |
<text>
<front>...</front>
<body>...</body>
<back>...</back>
</text>
<group>
<text>...</text>
<text>...</text>
<text>...</text>
</group>
<front> |
<front>
<titlePage>
<docTitle>
<titlePart type="main">
...
</titlePart>
<docAuthor>...</docAuthor>
<docDate>...</docDate>
<docEdition>...</docEdition>
<docImprint>...</docImprint>
<epigraph>...</epigraph>
</docTitle>
</titlePage>
</front>
<titlePage> |
<titlePage>
<docTitle>
<titlePart>
<title level="m" type="main">DE TELEURGANG VAN DEN WATERHOEK</title>
</titlePart>
</docTitle>
<titlePart>DOOR</titlePart>
<docAuthor>STIJN STREUVELS</docAuthor>
<docImprint>UITGAVE "EXCELSIOR" — BRUGGE</docImprint>
<docImprint>AMSTERDAM, L. J. VEEN, UITGEVER.</docImprint>
</titlePage>
A text usually has divisions |
<text>
<front> <!-- titlepage etc here --> </front>
<body>
<div1 type="book" n="1" id="b0100">
<head>Book1</head>
<div2 type="chapter" n="1" id="b0101">
<head>Chapter 1</head>
<!-- rest of the chapter -->
</div2>
<div2 type="chapter" n="2" id="b0102">
<head>Chapter 2</head>
<!-- rest of the chapter -->
</div2>
</div1>
</body>
</text>
Use of global attributes |
Text components in TEI Lite |
Prose: an example |
<p>Initially launched in 1987, the TEI is an international and interdisciplinary standard that helps libraries, museums, publishers, and individual scholars represent all kinds ofliterary and linguistic texts for online research and teaching, using an encoding scheme that is maximally expressive and minimally obsolescent.</p>
<p>For current membership of the TEI Consortium, please check the members list.</p>
Verse: an example |
<lg type="poem">
<head>Poor Edward</title>
<lg type="stanza">
<l>Did you hear the news about Edward?</l>
<l>On the back of his head he had another face</l>
<l>Was it a woman's face or a young girl?</l>
<l>They said to remove it would kill him</l>
<l>So poor Edward was doomed</l>
</lg>
<lg type="stanza">
<l>The face could laugh and cry</l>
<l>It was his devil twin</l>
<l>And at night she spoke to him</l>
<l>Things heard only in hell</l>
<l>But they were impossible to separate</l>
<l>Chained together for life</l>
</lg>
<lg type="stanza">
<l>Finally the bell tolled his doom</l>
<l>He took a suite of rooms</l>
<l>And hung himself and her from the balcony irons</l>
<l>Some still believe he was freed from her</l>
<l>But I knew her too well</l>
<l>I say she drove him to suicide</l>
<l>And took poor Edward to hell</l>
</lg>
</lg>Drama: an example |
<stage>Enter Barnardo and Francisco, two Sentinels,at several doors</stage>
<sp who="Barnardo"><l>Who's there?</l></sp>
<sp who="Francisco"><l>Nay, answer me. Stand and unfold yourself.</l></sp>
<sp who="Barnardo"><l>Long live the king!</l></sp>
<sp who="Francisco"><l>Barnardo?</l></sp>
<sp who="Barnardo"><l>He.</l></sp>
Page and line numbers |
Whan that Aprill with his shoures soote<lb /> The droghte of March hath perced to the roote,<lb /> And bathed every veyne in swich licour<lb /> Of which vertu engendred is the flour;<lb /> <pb ed="riverside" n="23" /> Whan Zephirus eek with his sweete breeth<lb />
Texts are not just words... |
Highlighted phrases |
<hi rend="gothic">And this Indenture further witnesseth</hi> that the said <hi rend="italic">Walter Shandy</hi>, merchant,...
Or |
<hi rend="gothic">And this Indenture further witnesseth</hi> that the said <hi rend="italic">Walter Shandy</hi>, merchant,...
<seg type="formula">And this Indenture further witnesseth</seg> that the said <name rend="italic">Walter Shandy</name>, merchant,...
Interpretive highlighting |
You did <emph>what?</emph>
A <term>DTD</term> specifies <gloss>the vocabulary and the syntax of a markup language</gloss>
They put us out of work and call it <soCalled>downsizing<soCalled>
<mentioned>Downsizing</mentioned> is a very nasty neologism
<q>: Direct speech |
<p> <q who="Flotte, Pierre" type="spoken">"Ho dit verstaen wy!"</q> viel <name reg="Flotte, Pierre" type="person">Pierre Flotte</name> <corr sic="in">in, </corr> <q who="Flotte, Pierre" type="spoken">"Maer Myne heeren geeft uwen draveren de spoor en haest u voort - want ginds zie ik Mynheer <name reg="De Valois, Charles" type="person"> De Valois </name> tusschen de boomen verdwynen. </q> </p>
"Foreign" language phrases |
<profileDesc>
<langUsage>
<language id="deu">German</language>
<language id="fra">French</language>
</langUsage>
</profileDesc>
<p>Have you read <title lang="deu">Die Dreigroschenoper</title>? <mentioned lang="fra">Savoir-faire</mentioned> is French for know-how. John has real <foreign lang="fra">savoir-faire</foreign>.</p>
Phrase level elements |
Dates, times, numbers |
Today is <date>Monday 15th</date> Today is <date value="2004-03-15">Monday 15th</date> One day in <date certainty="approx" value="2004-03">late March</date> Its now <time value="12:00">noon</time>. <num value="15">fifteen</num> <num value="3.1419">pi</num>
Correction and regularisation |
<p>"Ho dit verstaen wy!" viel <name reg="Flotte, Pierre" type="person">Pierre Flotte </name> <corr sic="in">in, </corr> "Maer Myne heeren geeft uwen draveren de spoor en haest u voort - want ginds zie ik Mynheer <name reg="De Valois, Charles" type="person">De Valois</name> tusschen de boomen verdwynen." </p>
Omissions, Deletions, Additions |
<gap reason="illegible" desc="bloodstain"> He was <del resp="EV" hand="author" type="strike">not</del> very nice. He was <add resp="EV" hand="author" place="supralinear">not</add> very nice. He was <unclear resp="EV" reason="ink stain">not</unclear> very nice.
Abbreviations and expansions |
We learn how to write <abbr expan="eXtensible Markup Language">XML</abbr>
Addresses |
<address> <addrLine>Koninklijke Academie voor Nederlandse Taal- en Letterkunde</addrLine> <addrLine>Koningstraat 18</addrLine> <addrLine>b-9000 Gent</addrLine> <addrLine>tel: +32 (0)9 265.93.50</addrLine> <addrLine>fax: +32 (0)9 265.93.49</addrLine> <addrLine>email: ctb@kantl.be</addrLine> </address>
Lists |
<list type="ordered"> <item>Week 1</item> <item>Week 2</item> <item>Week 3</item> <item>Week 4</item> <item>Week 5</item> </list> <list type="gloss"> <head>Vocabulary</head> <label lang="enm">Whan that</label> <item>When</item> <label lang="enm">Aprill</label> <item>April</item> <label lang="enm">with</label> <item>with</item> <label lang="enm">his</label> <item>its</item> <label lang="enm">shoures</label> <item>showers</item> <label lang="enm">soote</label> <item>sweet</item> </list>
Notes |
<p>Indeed, hypertext is just the visualization of linking which DeRose & Van Dam define as "the ability to express relationships between places in a universe of information"<note place="foot" n="1"> "A place should be any piece of information, or at least any that exists in a stable or recoverable form." (DeRose & van Dam 9).</note></p>
<table> |
<table rows="2" cols="2">
<row role="label">
<cell>Male Students</cell>
<cell>Female Students</cell>
</row>
<row role="data">
<cell>1</cell>
<cell>5</cell>
</row>
</table>
Bibliography |
<bibl>
<author>Walsh, Marcus</author>
<date>(1993)</date>
<title level="a">The Fluid Text and the Orientations of Editing.</title>
<editor>Chernaik, Warren, Caroline Davis, and Marilyn Deegan</editor>
<title level="m">The Politics of the Electronic Text</title>
<imprint>
<pubPlace>Oxford</pubPlace>
<publisher>Office for Humanities Communication</publisher>
</imprint>
<biblScope>31-39</biblScope>
</bibl>
Referring strings |
<q>My dear <rs type="person" key="BENM1">Mr. Bennet</rs>,</q> said <rs type="person" key="BENM2">his lady</rs> to him one day, <q>have you heard that <rs type="place" key="NETP1">Netherfield Park</rs> is let at last?</q>
<figure> |
<!ENTITY logoctb SYSTEM "logoctb.gif" NDATA GIF> <figure entity="logoctb"> <head>The logo of the CTB</head> <figdesc>The letters c, t, and b in red with black border on a white field</figdesc> </figure>
The multiple hierarchy |