|
The Standard Generalized Markup Language
The Standard Generalized Markup Language
(SGML)
provides a specification for how markup can be added to textual information. SGML thus describes
structured text, but it provides no specification, or direction regarding how structured text should be
managed, searched or updated.
Markup is added to raw textual documents to clarify the content and interpretation of text, to associate
logical hierarchical structures with the text, and to provide instructions on how text should be formatted,
and/or integrated with other types of data such as images.
The pages that you access through the World Wide Web, are written using HTML, which conforms to the SGML
standard. If you view the source code for this page you will see the markup contained within it. This markup
is surrounded by angle brackets (for example <TITLE> ... </TITLE>), and serves primarily to
identify documents, and describe how they should be presented.
Now consider the markup shown below, that might be present within the text of Hamlet. This markup differs from
HTML in that it is primarily adding descriptive information to the text, and is only rarely being used to
explicitly specify how the text is to be presented by a document formatter. This descriptive markup is more
meaningful, can be readily translated into presentational markup by a document formatter, and has the advantage
that it preserves the semantics associated with the text, provides the text with structure, and allows more
detailed questions to be asked about the text. Less obviously, it also provides more flexibility (since the
text can be formatted in many different ways), and allows gross errors in the text to be more readily
identified. For example, we could readily detect in the example below any cases where act occurred
within scene, and correct these and other such errors.
Excerpt from The Tragedy of Hamlet Prince of Denmark
<body>
<title>The Tragedy of Hamlet Prince of Denmark </title>
<act>
<actno>1</actno>
<scene>
<sceneno>1</sceneno>
<direction>
<i> Enter Barnardo and Francisco, two sentinels, at several doors</i>
</direction>
<speech>
<speaker>BARNARDO</speaker>
<said> Who's there?</said>
</speech>
<speech>
<speaker>FRANCISCO</speaker>
<said> Nay, answer me. Stand and unfold yourself.</said>
</speech>
....
</scene>
....
</act>
....
</body>
When transduced into HTML this text might be viewed as:
The Tragedy of Hamlet Prince of Denmark
Act 1
Scene 1
Enter Barnardo and Francisco, two sentinels, at several doors
BARNARDO: Who's there?
FRANCISCO: Nay, answer me. Stand and unfold yourself.
|