Lists Home |
Date Index |
- From: Clark Evans <email@example.com>
- To: Kevin Hsu <firstname.lastname@example.org>
- Date: Tue, 30 Mar 1999 18:56:29 +0000
Kevin Hsu wrote:
> I know the XML is the subset of SGML , and SGML is more complex and detail ,
> but I must write a paper to tell the difference,
> who can tell me the major difference between the SGML and XML, or where can
> I find information , thanks in advance!
I hope this will help:
-------- Original Message --------
Subject: Advantages of XML and SGML
Date: Fri, 12 Feb 1999 20:28:33 +0000
From: Clark Evans <email@example.com>
Reply-To: Clark Evans <firstname.lastname@example.org>
Cc: Susan Barron <email@example.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.
Can have two syntatic intererpretations:
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
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
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.
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!
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)