TEI-XML Validation With Visual Studio Code

As a free open-source alternative to oXygen, I’ve suggested using Visual Studio Code](https://code.visualstudio.com/) in our pre-workshop installation instructions. The video below explains how you can install an extension in Visual Studio Code that can still give you the benefit of on the fly validation against the TEI’s XML namespace when you do.

For an index of the XSD schemas of the TEI’s official subsets you could use, see https://tei-c.org/release/xml/tei/custom/schema/xsd/.

TL;DR

  1. Install Visual Studio Code
  2. Install the XML Language Support Extension by Red Hat
  3. Add the following line to the prologue (i.e. before the root opening tag) of your TEI-XML document):

<?xml-model href="https://tei-c.org/release/xml/tei/custom/schema/xsd/tei_all.xsd" type="application/xml-xsd"?>

As with most open source text editors, extensions such as these are developed and maintained by third parties (here: Red Hat). In this ecosystem, exensions are continuously updated or depracated, and new ones spring up all the time.

I recorded this video in 2022, and much may have changed by the time you are watching it. If this method stops working at some point, hopefully it may still help you understand how it works, and find a more up-to-date method or alternative extension to achieve a similar result. In that case, you are of course always welcome to suggest changes, e.g. via a pull request on GitHub. This also goes for adding links or instructions to other tools or extensions that may be useful for this workshop.