Chapter 12. Validating TEI format files

Validating TEI files requires an installed version of the TEI DTD and a validating XML parser. It is assumed you have sp or opensp installed. These make the commands nsgmls respective onsgmls available.

Validation should be available as a target in the Makefile of each dictionary module. Try make validation for the dictionary module you want to validate (cd to it first).

The Makefile target itself is simple. It sets some environment variables, so that nsgmls can find the DTDs, tells it to handle XML data and then calls it.

This is what is done:

        test -e $(XMLSOC) || (echo "Please set path to xml.soc file!"; exit 1)
        export SP_ENCODING=XML
        export SP_CHARSET_FIXED=YES
        export SGML_CATALOG_FILES="$(XMLSOC):$(CATALOGS)"
        nsgmls -s -E 10 $(LANGUAGE).tei