SGML is actually a metalanguage used to define mark up languages. The definitions are called Document Type Definitions or DTDs.
The key notation is that of a structural tag. Each part of a document (an element) has its purpose, its place in the whole, and possibly its format, indicated by certain tags. Tags have two forms:
</name>The first is used to start an element of type name The second form terminates the element. Either of these may be optional, or both may be required. SGML DTDs define the tags and whether the initial and final formas are required or optional. Further SGML DTDs define what elements can appear inside each type of element.
These DTDs also define the various abbreviations that are permitted. These tend to make the document easier to write and harder to read.
The key idea is that a document has a tree structure and the tags define the nodes in the tree. For example a Tree with a node type A with two parts of type B and C respectively might be encoded as:
<A> <B> content of B </B> <C> content of C </C> </A>
The attributes in the first tag of an element can be used to further describe the meaning of the element. For example a tag with name IMAGE might mean that a grphic is to be included in the text and an attribute can supply the name of the file that holds the code forthe graphic.
SGML also defines certain elements - symbolic forms for particluar characters in the defined type of document.
SGML and HTML
[ comp.html.syntax.html ]
Document Type Descriptions
SGML defines a special metalanguage for describing elements
and attributes. A document that follows these rules is said to be
DTDs can be quite complex. One solution to this is the eXtendable mark up Language [XML below].
The syntax for defining an element is as follows:
Each elemnt has a list of possible attribute forms:
More TBA ...
XML is the Extendable Markup Language. It is a simplified
subset of SGML. In particular XML documents have case sensitive
tags, attributes must be in quotes, and there are none of the
abbreviations that make SGML difficult to parse and worse to read.
[ xml.html ]
[ http://www.w3.org/XML/ ]
. . . . . . . . . ( end of section Standardized Generalized Mark Up Language - SGML) <<Contents | End>>