Code documentation

Development tools

Code Structure

Techniques and Standards

How To

Functional Info

Background Info

JMRI: XML DTD Usage

This page describes the former usage of XML DTDs in JMRI before version 2.9.4. The use of these DTDs in JMRI was replaced with XML schema in JMRI 2.9.4.

In the JMRI distributions, the DTDs are stored in the xml/DTD directory. Note that they are not stored in each directory alongside the XML files. There are just too many locations to keep such a set of DTD files up to date. JMRI itself, via the jmri.jmrit.XmlFile class, provides support for locating those files when the XML parser needs them.

Each file contains a DOCTYPE line that specifies a DTD name. There are three different methods used to locate the actual DTD file: Starting with JMRI 2.9.4, JMRI uses XML schema instead of DTDs, and this process is different.