Advantages of XML and SGML
Clark Evans
clark.evans at manhattanproject.com
Fri Feb 12 20:34:47 GMT 1999
Would you all correct me where I'm wrong here?
Thanks!
Clark
-------- Original Message --------
Subject: Re: Advantages of XML and SGML
Date: Fri, 12 Feb 1999 20:27:28 +0000
From: Clark Evans <clark.evans at manhattanproject.com>
To: Susan Barron <susan.d.barron at lmco.com>
Newsgroups: comp.text.xml
References: <36C423D5.EB0B6C40 at lmco.com>
Susan Barron wrote:
>
> We have been using SGML for several years and are closely watching the
> trend towards XML. Could someone please give me some examples of why
> you would use XML over SGML. I know that XML is a subset of SGML. I
> believe there must be some things that can be done in SGML that are not
> possible in XML. Conversely, there must be somethings that XML does
> better than SGML. Thank you.
Since minimization is allowed in SGML, this creates situations
where the meaning of document can have multiple syntatic interpretations.
For instance:
<parent>
<child>
Can have two syntatic intererpretations:
<parent>
<child>
</child>
</parent>
OR
<parent>
</parent>
<child>
</child>
The DTD is required for the parser to figure out which one is
the correct interpretation of the input. As such, an SGML
document must have one_and_only_one DTD to resolve these
syntatic ambiguities.
XML restricts the syntax by eliminating these minimizations.
Thus, all documents have one and only one syntatic interpretation.
This dramatically reduces the complexity of the parser. Thus, a
parser can be simpler to implement, and a DTD is _not_ required
for parsing.
This lets the DTD be used for a 100% semantic role, which
is much more interesting for describing data! This is great
beacuse it allows a document to conform to more than
one DTD at the same time, _without_ requiring a "mother"
DTD that merges all of the DTD's together. This is
called "Architectures". It allows multiple meanings
for the same document, depending upon the observer
without requireing all of the possible observers
to get together and specify a "united" DTD.
However, this added flexibility, comes at a price:
The syntax becomes much more restrictive.
Therefore,
For computer program <=> computer program
communication XML is the ideal structure to use.
Since it allows multiple subscribers to have
their own interpretation of a data stream without
changing the publishers.
For human => computer communication SGML is will
probably still remain as the prefered structure.
The minimization features are very valueable
when a human is the author of the document.
Also, there is nothing saying you can't use both!
If a human is going to write it by hand, perhaps
SGML is better, then you can have JClark's SP
use the DTD to resolve the ambiguities and produce
the XML document that can be introduced into the
corporate "xml bus"
Hope this helps!
Clark Evans
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list