A program which checks the source of a document expressed in the Extensible Markup Language against its document type definition (DTD). It checks, for example, that the source syntactically matches the description given in the DTD, and provides facilities for program code to be executed when various tags are encountered.