Using the DTA Basic Format Schema

Availability of the Schema

The Relax NG Schema of the DTA basic format is located at: http://www.deutschestextarchiv.de/basisformat.rng.

The underlying ODD file is located at: http://www.deutschestextarchiv.de/basisformat.odd.

The associated complementary Schematron rule set is available at the following address: http://www.deutschestextarchiv.de/basisformat.sch.

Static vs. Current Schema

The DTA basic format is largely stable in its specification. However, there are still changes that may not be downward compatible, i. e. documents that have once been validated against the DTA basic format schema at http://www.deutschestextarchiv.de/basisformat.rng do not always guarantee to validate against this schema. Therefore, it may be useful to save a local copy of the schema and reference it in the XML sources.

Specification of the DTABf Schema in an XML File

A file that is compatible with the DTA basic format should contain the specification of the DTABf schema as well as the additional DTABf schema rules. This results in the following basic structure for DTABf files:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.deutschestextarchiv.de/basisformat.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.deutschestextarchiv.de/basisformat.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>[metadata]</teiHeader>
  <text>[text]</text>
</TEI>

If a local version of the schema is maintained, the schema specification is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="file:/pfad/zur/datei/basisformat.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="file:/pfad/zur/datei/basisformat.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>[metadata]</teiHeader>
  <text>[text]</text>
</TEI>

A template file, which can be used as a basis for the development of DTA basic format-compatible TEI files, can be found at http://www.deutschestextarchiv.de/files/vorlage_basisformat.xml.

The commercial XML editor oXygen supports the integration of a schema into an XML file with corresponding interface functions:

Including the DTABf schema in an XML document in the oXygen XML editor

Validation of XML Documents against the DTA Basic Format

The oXygen-XML-Editor validates the documents directly during editing against the respective included schema and issues corresponding error messages in case of validation problems.

In addition, there are several command line tools that can validate XML documents against a Relax NG Schema. Here are a few examples:

jing http://www.deutschestextarchiv.de/basisformat.rng source_file.xml
  
      xmlstarlet val -r http://www.deutschestextarchiv.de/basisformat.rng source_file.xml

Validation against the Schematron schema can be done from the command line using Probatron:

java -jar probatron.jar source_file.xml