[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: SGML and XML

  • From: Clark Evans <clark.evans@m...>
  • To: Kevin Hsu <shyutz@m...>
  • Date: Tue, 30 Mar 1999 18:56:29 +0000

susan barron
Kevin Hsu wrote:
> Hi,
> 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 <clark.evans@m...>
Reply-To: Clark Evans <clark.evans@m...>
To: xml-dev@i...
Cc: Susan Barron <susan.d.barron@l...>

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:


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 
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.


  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@i...
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@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.