Menu

Schema

EpiDoc Schema

The EpiDoc schema, the set of rules that tells an XML editor or processor what elements, attributes and other content are available in an EpiDoc file, is hosted at Stoa.org. The current release version of the EpiDoc Schema is 9.5.

Numbered versions of the schema are preserved for the sake of stability, but there is also a "latest" version which is under development and released once or twice per year. Static or finished projects are recommended to link to the latest numbered version to which their XML is known to be valid; in-development projects often link to the latest version, so as to notice immediately if changes to TEI or EpiDoc recommendations effect their current usage.

You can also download a zipped copy of the 9.5 Schema if you need to use it offline.

Deficiencies and errors in the Schema — especially discontinuities with the 9.4 Guidelines and example stylesheets — should be reported as bugs via our bug tracker.

Questions regarding any aspect of the Guidelines or the markup approaches they recommend are very welcome on the [MarkupList]. Persons interested in volunteering to assist with the development and maintenance of the Guidelines should also post a statement to that effect on the list.

How the schema is made

The EpiDoc schema is generated, like all TEI schemas, from an ODD file (a TEI format for expressing content models, guidelines and examples in a schema-independent language: One Document Does it all).

To modify the schema, one edits the ODD file, tei-epidoc-full.xml, and then follow the instructions (in README or below) to turn that into a RelaxNG schema (or other DTD or schema language).

Technical Requirements

The ODD requires the Roma tool (and associated dependencies) to generate the RelaxNG schema. The schema (whose canonical released versions live at http://epidoc.stoa.org/schema/) may be used by any XML editor or processing environment to validate EpiDoc XML files.

How to use it

To generate the schema

  1. edit the ODD (tei-epidoc-full.xml) to make any changes to the EpiDoc schema. NB that as a matter of policy the EpiDoc schema should be a conformant subset of the latest TEI schema (only exceptions being when the dev TEI ODD contains changes that will not make it into the TEI release for 1-6 months).
  2. Go to https://teigarage.tei-c.org
  3. Click "Documents". Select "ODD Document".
  4. Under "Convert to:" select "RelaxNG Schema" or "RelaxNG Compact Schema."
  5. Under "Select file to convert" click "Browsse"
  6. Select tei-epidoc-full.xml from your local file system.
  7. Click "Convert". The download should begin automatically
  8. Test thoroughly (and ask for support on Markup to test) before committing as canonical new EpiDoc schema.

To Associate the Schema with your Document

If using Oxygen or similar editor to edit XML files, processing instructions such as the following will allow you to edit or validate using EpiDoc:

<?xml-model href="https://epidoc.stoa.org/schema/9.4/tei-epidoc.rng"
schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://epidoc.stoa.org/schema/9.4/tei-epidoc.rng"
schematypens="http://purl.oclc.org/dsdl/schematron"?>

Putting these lines at the top of the XML file will instruct the editor to validate against this schema (as RelaxNG and Schematron respectively).

For more information on how to create a validating EpiDoc file once you have a schema, see [ValidatingToEpidocSchema].


Related

Home: Guidelines
Home: Home
Home: MarkupList
Home: ReleaseProc