0

I'm having an XML error that I can't figure out. Oxygen is giving me the following error and I don't understand how to resolve it. "The markup in the document following the root element must be well-formed."

The xml data is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<teiHeader>
  <fileDesc>
    <titleStmt>
      <title>Decimas 1, Sermo 8 [London 1587 Transcription]</title>
      <author ref="#HenrichBullinger">Henrich Bullinger</author>
      <editor>Ema-Joanne M. Brauchler </editor>
    </titleStmt>
    <editionStmt>
      <edition n="0.0.0-dev">
        <title>Decimas 1, Sermo 8 [London 1587 Transcription]</title>
        <date when="2019-11-08">March 1, 2020</date>
      </edition>
    </editionStmt>
      <publicationStmt>
        <authority>SCTA</authority>
        <availability status="free">
        <p>Published under a <ref target="https://creativecommons.org/licenses/by-nc-sa/4.0/">Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)</ref></p>
      </availability>
    </publicationStmt>
    <sourceDesc>
      <listWit>
        <witness xml:id="L" n="cod-u2dgeg">London 1587</witness>
      </listWit>
    </sourceDesc>
  </fileDesc>
  <encodingDesc>
    <schemaRef n="lbp-diplomatic-1.0.0" url="https://raw.githubusercontent.com/lombardpress/lombardpress-schema/1.0.0/src/out/diplomatic.rng"/>
    <editorialDecl>
      <p>Encoding of this text has followed the recommendations of the LombardPress 1.0.0 
         guidelines for a diplomatic edition.
      </p>
    </editorialDecl>
  </encodingDesc>
  <revisionDesc status="draft">
    <listChange>
      <change when="2019-06-20" status="draft" n="0.0.0">
        <p>Created file for the first time.</p>  
      </change>
        </listChange>
    </revisionDesc>
</teiHeader>
<text xml:lang="de">
    <front>
    <div xml:id="starts-on">
      <pb ed="#L" n="30"/>
   </div>
  </front>
  <body>
    <div xml:id="UD1xh4-GFKe50">
      <p>
          <!-- 67.xml -->
          <pb ed="#L" n=67/>
          <cb ed="#L" n=b/>
          <lb ed="#L" n=1/>Let us first of all 
          <lb ed="#L" n=2/> pray to our God 
          <lb ed="#L" n=3/> ye he will vouch 
          <lb ed="#L" n=4/> safe to graunt us 
          <lb ed="#L" n=5/> an happy, speedie, 
          <lb ed="#L" n=6/>and verie fruite
          <lb ed="#L" n=7/> full proceeding in 
          <lb ed="#L" n=8/>the declaratio of
          <lb ed="#L" n=9/> the otehr Articles of Christian be
          <lb ed="#L" n=10/> leefe.
      </p>
      <p>
          <lb ed="#L" n=11/> the fift Article of our beleefe is:

      <p>
        <lb ed="#L" n=35/>And again in another place the same 
        <lb ed="#L" n=36/>Apostle sayth: <quote>This I say unto you in 
          <lb ed="#L" n=37/>the worde of the Lord, that we, which 
          <lb ed="#L" n=38/>shal live and be remaining at the com
          <lb ed="#L" n=39/>ming of the Lorde, shall not prevent 
          <lb ed="#L" n=40/>them which are a sleepe. Because the 
          <lb ed="#L" n=41/>Lorde himselfe shall come downe out 
          <lb ed="#L" n=42/>of heaven with a great noyse, and the 
          <lb ed="#L" n=43/>voice of an Archangell and the trump 
          <lb ed="#L" n=44/>of God, and first shall the deade in 
          <lb ed="#L" n=45/>Christ rise, up againe, then shall we 
          <lb ed="#L" n=46/>which shall be alive and be remaining,</quote>
      </p>
    </div>
  </body>
</text>
</TEI>

Please help I am a beginner and I mainly just edit XML code and don't do anything technical. This is the first XML document I created by hand and I've been trying to solve this issue for weeks.

I tried adding another root, removing the text root (the error just moved from line 43 to 42) and retyping the code. I cannot figure it out. Any and all advice is welcome. Thanks.

  • You cannot add another root. An XML-1.0 file has **_exactly_** one root element. – zx485 Mar 26 '20 at 21:44
  • What am I missing? – ejmbrauchler Mar 26 '20 at 21:45
  • 1
    You have two root elements: `teiHeader` and `text`. And your are also closing a third root element `TEI` - which hadn't been opened and is therefore invalid. But you can only have **one** root element. Change your XML accordingly. – zx485 Mar 26 '20 at 21:50

1 Answers1

1

You can see an example of a well-formed TEI document here:

https://tei-c.org/release/doc/tei-p5-doc/en/html/examples-TEI.html

The structure is

<TEI>
  <teiHeader>
    ...
  </teiHeader>
  <text>
    ...
  </text>
</TEI>

You're missing the starting <TEI> tag.

Your document starts with the <teiHeader> start tag, so the parser assumes that the matching </teiHeader> end tag ends the document, and then complains when it finds there's more content after this.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164