A Document Type Definition ( DTD) is a set of declarations that describe the structure of a type of XML documents . Serna comes with DTDs for supported popular document types. You can also develop your own DTDs. DTDs are sometimes required by the XML parser on opening a document and may contain important internal or external entity declarations and #ID/ #IDREF attribute declarations.
A DTD is associated with an XML document by means of a Document Type Declaration ( DOCTYPE). DOCTYPE is a tag at the beginning of an XML document that establishes that the document is an instance of the type defined by the referenced DTD.
The external declarations are located in a separate file.
The external subset may be referenced via a public identifier (PUBID) and/or a system identifier (SYSID) in the Document Type Declaration.
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd" []>
The internal declarations are embedded in the Document Type Declaration in the XML document itself.
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "docbookV4.5/docbookx.dtd" [ <!ENTITY abc 'abc'>]>
See also information about DTD on W3C.
In Serna, when you create a new document with a Serna document template, a corresponding DTD prescribed by the template is applied automatically. You can also assign the path to some DTD other than that prescribed by the selected template.
When loading a document that has nonempty DTD SYSID, Serna tries to find and parse the DTD. To locate the DTD and XML entities, Serna uses XML catalogs and/or DTD search paths.