DTD file

From TrillWiki

Jump to: navigation, search

DTD stands for Document Type Definition. (Not to be confused with the Document Type Declaration, which is the <!DOCTYPE> at the beginning if the XML file.)

As defined in the W3C XML Spec:

[Definition: The XML document type declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition, or DTD. The document type declaration can point to an external subset (a special kind of external entity) containing markup declarations, or can contain the markup declarations directly in an internal subset, or can do both. The DTD for a document consists of both subsets taken together.]

In other-words, the XML defines the structure of a document, but the DTD tells the XML what words it can use and how they work together (its grammar).

This file is defined in the Document Type Declaration (DOCTYPE) of an XML file. In Trillian, it's defined in trillian.xml by the line:

<!DOCTYPE test SYSTEM "trillian.dtd">

This filename can be anything. In fact, the only files that have to have specific names in a skin are Trillian.xml and Desc.txt. Everything else is defined by this .DTD file (or any DTD files it calls). (The DTD file for STIXE skins is ../../stixe/trillian.dtd )

In Trillian, most of the DTD functions are actually built-in to Trillian itself. (This is the reason skins don't parse as valid XML from real XML editors.) However, some things had to be in the DTD, which is why you have all of the <!ELEMENT and ATTLIST lines.

Skinners can use these DTD files to give end-users configurability in the skin. (See Skinning Tips) Since there is no standard editor for .DTD in Windows, some skinners have changed the extension to .TXT or .INI so that it's easier for their end-users to edit them.

[edit] See also

Personal tools