SGML is a Standard Generalized Markup Language defined in ISO standard 8879:1986. SGML takes the concept of descriptive markup beyond the level of other markup languages. By defining the role of each piece of text in a formal model, users of programs based on the SGML can check that each element of text is used in the correct place. SGML allows computers to check, for example, that users do not accidentally enter a third-level heading without first having entered a second-level heading.
Once a formal model has been defined for a particular type of document it becomes possible to off-load a large part of the document markup task to the computer. By giving the computer sufficient clues to determine where it is within the model, it is possible to set up a system to automatically add appropriate markup to a file.
SGML also allows users to:
- link files together to form composite documents
- identify where illustrations are to be incorporated into text files
- create different versions of a document in a single file
- add editorial comments to a file
- provide information to supporting programs.
When used in conjunction with specially written data retrieval and document formatting programs, these techniques allow integrated document production systems to be developed.
It is important to note, however, that SGML is not:
- a predefined set of tags that can be used to markup documents
- a standardized template for producing particular types of documents.
SGML was not designed to be a standardized way of coding text: in fact it is impossible to devise a single coding scheme that would be suit all languages and all applications. Instead SGML is formal language that can be used to pass information about the component parts of a document to another computer system. SGML is flexible enough to be able to describe any logical text structure, whether it be a form, memo, letter, report, book, encyclopedia, dictionary or database.