SGML defines how you embed descriptive markup in a document so that the content is treated as data rather than as characters AND provides a way to describe the structure of the document. The DTD describes the structure of a document by defining the elements, structure and rules for marking up a document. The DTD can be imbedded in the document or contained in an external file.
Style is the specification that actually does the formatting.
With the FOSI, the document, and the DTD, you have a complete interchange package for printed documents. What we know and love is derived from SGML and first proposed in 1992. Introduction Extensible Markup Language, abbreviated XML, describes a class of data objects called XML documents and partially describes the behavior of computer programs which process them. By construction, XML documents are conforming SGML documents. XML documents are made up of storage units called entities, which contain either parsed or unparsed data.