Difference Between Similar Terms and Objects

Difference Between SGML and XML

xmlSGML vs XML

SGML (Standard Generalized Markup Language) is the standard for encoding paper documents into an electronic format. With the evolution of the internet, it became clear that HTML is no longer able to provide the need for more dynamic content as it has reached its limitations. XML (Extensible Markup Language) is a language that was derived from SGML and contains a more limited feature set in order to make it simpler for coders to use as SGML is too comprehensive and complex for the intended use. Since XML is simply a subset of SGML, SGML parsers are capable of reading and decoding valid XML files. The reverse is not necessarily true though as SGML files might have features that the XML parser does not understand.
Being a subset, there would be no feature in XML that does not exist in SGML. Here is a short list of what’s been removed.
The following SGML declarations are no longer allowed in XML:

  • DATATAG
  • OMITTAG
  • RANK
  • LINK
  • CONCUR
  • SUBDOC
  • FORMAL

The following SGML constructs are no longer allowed in XML:

  • Empty start tags
  • Empty end tags
  • Unclosed start tags
  • Unclosed end tags

Attribute specifications with no name
Directly entered attribute values in attribute specification are not allowed and should be entered in literals
The following SGML entity declarations are no longer allowed in SGML

  • External SDATA entities
  • Internal SDATA entities
  • External CDATA entities
  • Internal CDATA entities
  • #DEFAULT entities
  • PI entities
  • Bracketed text entries

You are no longer allowed to specify attributes for entities.
Changes have also been made in the way that coders place comments into their code. A comment declaration is no longer allowed to have more than a single comment. An empty comment declaration has also been disallowed. A parameter separator is disallowed to contain any comment. This includes any markup declaration, excluding comment declarations, of course.
Summary:
1.XML is a subset of SGML
2.XML is simpler compared to SGML
3.XML documents should be readable with SGML parsers while some SGML might produce errors in XML parsers
4.A list of SGML declarations have been removed in XML
5.Some constructs that are allowed in SGML are no longer permitted in XML
6.Some SGML entities are no longer allowed in XML
7.Some comment practices in SGML have also been disallowed in XML

Sharing is caring!


Search DifferenceBetween.net :




Email This Post Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.


1 Comment

  1. nice XML and SGML

Leave a Response

Please note: comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Articles on DifferenceBetween.net are general information, and are not intended to substitute for professional advice. The information is "AS IS", "WITH ALL FAULTS". User assumes all risk of use, damage, or injury. You agree that we have no liability for any damages.


See more about : ,
Protected by Copyscape Plagiarism Finder