Benefits of SGML, or where SGML can be used
Benefits
SGML separates logical structure and lay-out (physical) stucture. That means that writers can concentrate on content of the document instead of consentrating how it should look. Writer is not a typesetter.
Usually the main goal of the traditional text processing is paper output, but SGML documents can be used many different ways in different applications.
Each word processor or text editor uses its own file format which other word processors don't understand. If you want to use MacWrite files in PC Windows Word you need conversion.
SGML documents are device independent which means that SGML documents can easily be interchanged between different operating systems and softwares without any conversion.
Documents logical structure is made explicit by inserting tags into document. Computer programs can recognize start and end of each element. That makes possible to...
- Filtering documents
- Alternative structural views, i.e. show reader only some of the elements like title, author and abstract.
- Creating smaller documents from original (automatically), e.g. Oxford English Dictionary and Shorter Oxford English Dictionary.
- Many different products from one source file, i.e. paper version, CD-ROM -version and On Line -version. By defining style sheets for each type of product, preparing process can be automated.
- Information retrieval, structure-based searches
- Searches can be restricted to relevant elements like in query: "Show all subsections in abstract where is paragraph with word WORD1 in first sentence and WORD2 in subsection heading"
or query "Show all paragraphs where is WORD3 in element quotation".
- Hypertext, cross references, automatic creation of bibliographies and table of contents
- Electronic publishing, technical douments,
Some disbenefits
Creating DTD for complex document is difficult.
SGML is quite complex, especially with tabular material and mathematical formulas.
SGML files are bigger than plain text files.