Skip to content

TEI

Below is an example of a manuscript encoded with XML using the TEI P5 Guidelines.

I chose a page from the diaries of Marjory Fleming to encode. Marjory Fleming was a Scottish child writer and poet who lived in the early nineteenth century and died at only 8 years old. This diary entry offers her thoughts after encountering Macbeth.

Here’s the image of the page I encoded:

Page from the diary of Marjory Fleming in her handwriting

Here is the encoded output using XML with XSLT:

And here is the raw XML:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml"
	schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
   <teiHeader>
      <fileDesc>
         <titleStmt>
            <title>Diary of Marjory Fleming: sample page</title>
            <author>
               <persName>Marjory Fleming</persName>
            </author>
            <respStmt>
               <resp>Encoded by</resp>
               <name xml:id="SB">Suzanne Black</name>
            </respStmt>
         </titleStmt>
         <publicationStmt>
            <p>For example purposes only; not to distribute.</p>
         </publicationStmt>
         <sourceDesc>
            <p>National Library of Scotland</p>
         </sourceDesc>
      </fileDesc>
   </teiHeader>
   <standOff>
      <listPerson>
         <person xml:id="Queen01" role="nobility">
            <persName xml:lang="en">Mary, Queen of Scots</persName>
            <birth when="1542-12-08">8 December 1542<placeName>
                  <settlement type="building">Linlithgow Palace</settlement>
                  <country key="GBR">United Kingdom</country>
               </placeName>
            </birth>
            <death when="1587-02-08">8 February 1587<placeName>
                  <settlement type="building">Fotheringhay Castle</settlement>
                  <country key="GBR">United Kingdom</country>
               </placeName>
            </death>
            <sex>female</sex>
            <occupation>monarch</occupation>
         </person>
         <person xml:id="Queen02" role="nobility">
            <persName xml:lang="en">Elizabeth I</persName>
            <birth when="1533-09-07">7 September 1533<placeName>
                  <settlement type="building">Palace of Placentia</settlement>
                  <country key="GBR">United Kingdom</country>
               </placeName>
            </birth>
            <death when="1603-03-24">24 March 1603<placeName>
                  <settlement type="building">Richmond Palace</settlement>
                  <country key="GBR">United Kingdom</country>
               </placeName>
            </death>
            <sex>female</sex>
            <occupation>monarch</occupation>
         </person>
      </listPerson>
   </standOff>
   <facsimile>
      <surface xml:id="image01"> </surface>
   </facsimile>
   <text>
      <body>
         <div type="diary_entry">
            <pb n="01" facs="#image01"/>
            <p>
               <lb/>Macbeth is a fearful play. I pityed
               <lb/><persName ref="#Queen01">Mary Queen of Scots</persName> when the
               <lb/>people held a standard on which
               <lb/>was painted the dead king and
               <lb/>his son kneeling and uttering
               <lb/>these words judge &amp; revenge any
               <lb/>cause O Lord I should not liked to
               <lb/>have been <rs ref="#Queen01">her</rs> but I think it was very
               <lb/>wrong on the people to mock their
               <lb/><rs ref="#Queen01">sovereign &amp; queen</rs>. I have seen
               <lb/><rs ref="#Queen01">her</rs> picture &amp; think <rs>her</rs> most
               <lb/>Beautiful &amp; <persName ref="#Queen02">Angelick Elisabeth</persName>
               <lb/>behaved very crually to poor
               <lb/>poor <persName ref="#Queen01">Mary</persName>.</p>
         </div>
      </body>
   </text>
</TEI>

Bibliography

National Library of Scotland. Diary, letters and poems of Marjory Fleming. National Library of Scotland, 2021. https://doi.org/10.34812/weby-2v34.

TEI Consortium, eds. TEI P5: Guidelines for Electronic Text Encoding and Interchange. Version 4.2.2. [Last modified 9 Apr 2021, revision 609a109b1]. TEI Consortium. http://www.tei-c.org/Guidelines/P5/.

css.php