How to resolve TEI transcription errors


TEI XML is the coding language that is used for Nyingarn’s text transcriptions. The WRITE transcription box allows you to add and remove TEI using buttons. Most of the TEI command buttons produce two parts of code, a beginning and an end. For example, the code <line> signifies the beginning of a new line and the code </line> signifies the end of a line. These two codes should sit on either side of the text that they describe.

Contents

Dealing with error messages

If there is an error with your TEI code, you will not be able to save the page and will see a red exclamation mark next to the save button. If you hover your mouse over the exclamation mark, it will tell you why and where the error occurs.

Pages with a red background in thumbnail view contain TEI errors. This sometimes means that the TEI document has not yet been produced and the Workspace needs more time to process the page.

‘Opening and ending tag mismatch’

A common TEI error in the Workspace is code appearing without its pair: e.g. <line> appearing at the start of the line with no </line> at the end of the line.

In the screenshot above, the error message tells us that there is an ‘opening and ending tag mismatch’ on line 6. To fix the error, we need to add </line> to the end of line 6.

‘Extra content at the end of the document’

Each page of your transcription needs to begin with the <surface> tag and end with the </surface> tag. If you are starting a transcription from scratch and want to delete the OCR produced text, make sure that you delete everything that appears inside the <surface> </surface> tags. The ‘extra content at the end of the document’ error means the surface tags have been deleted.

If you can, click the undo button to undo the deletion of surface tags. If this doesn’t work, copy and paste the surface code from another page of the document, replacing the image file name with the page you are working on.

‘xmlParseEntityRef: no name’

Another common error cause is using ampersand (&) in the text. This cannot be done using your keyboard as the ampersand is used within the coding language.  

To insert an ampersand, use the blue ‘&’ button. Once the ampersand is inserted with the mark up button, you will be able to save the transcription as normal.

‘Invalid element name’

Like ampersand, chevrons (< and >) are also used in the TEI coding language. If you type a chevron into the text, you will receive the TEI error message ‘invalid element name’. Note the yellow and red colour coding in the screenshot below as the Workspace interprets words that follow the chevron as part of the code.

To insert a chevron that appears in the text, use the blue ‘<’ and ‘>’ buttons in the sidebar. 

The Nyingarn Workspace allows users to see errors in their TEI transcriptions quickly. This video demonstrates how to resolve this error using the ‘convert text to TEI document’ markup button.