Re: SGML -- Still in use today?

Subject: Re: SGML -- Still in use today?
From: Mark Baker <mbaker -at- OMNIMARK -dot- COM>
Date: Tue, 31 Mar 1998 11:18:33 -0500

Kees de Bondt wrote:
>

>XML will not replace SGML or HTML because there are things that SGML can
>handle what XML can't.
>XML is a simplified SGML-version optimized for use by web-authors and to
>lower the technical barriers of full SGML to a wider 'audience'.
>


This may be a little misleading. XML and SGML are both meta languages used
to define tagging languages. HTML is an example of a tagging language
defined in SGML. HTML cannot be defined in XML because it uses tag omission,
a feature of SGML not found in XML. So, in that sense at least, there are
"things that SGML can
handle what XML can't."

On the other hand, XML is just as general as SGML. Any data representation
problem that you can solve in SGML you can solve in XML. You have a more
limited choice of syntax in XML, but that does not affect your ability to
represent data, only the specifics of the markup you use.

By the way, neither SGML nor XML is completely general. They can only define
hierarchical element based markup. Thus the following is always illegal in
XML and inconceivable, though perhaps not impossible, in SGML:

blah <b> blah <i> blah </b> blah </i> blah

In element based markup, elements must be properly nested so the b element
cannot overlap the i element. But that does not mean this is bad markup. It
is a state based markup of the sort used by Word Perfect, for instance, in
which tags don't represent the start and end of nested elements but the
switching on and switching off of independent states.

Actually, you could fake state-based markup in SGML and XML using empty
tags:

blah <b-on/> blah <i-on/> blah <b-off/> blah <i-off/> blah

Of course, you would need a browser capable of recognizing that markup or an
application capable of turning it into markup a browser could recognize.

It should be noted that neither SGML not XML alone is sufficient to define a
tagging language. You also need to create a processing application that
knows what the tags mean and how to handle them. A web browser is a processi
ng application for HTML markup. It you want to start using your own markup
language, defined using XML, you are going to have to write your own
processing application.

By the way, for a little bit of entertainment, try pasting the following
into an HTML file and viewing it with Internet Explorer and Netscape
Navigator.

<html>blah <b> blah <i> blah </b> blah </i> blah</html>

The results are quite different in each browser and neither one is legal
behavior by the rules of SGML. Just shows that it is the processing
application, rather than the markup, that ultimately determines the meaning
and usefulness of a tagging language.

---
Mark Baker
Manager, Corporate Communications
OmniMark Technologies Corporation
1400 Blair Place
Gloucester, Ontario
Canada, K1J 9B8
Phone: 613-745-4242
Fax: 613-745-5560
Email mbaker -at- omnimark -dot- com




Previous by Author: Re: Trapping your content in HTML
Next by Author: Did Microsoft really copyright "Wizard"?
Previous by Thread: Re: SGML -- Still in use today?
Next by Thread: THis week in Help features information of interest to all writers...


What this post helpful? Share it with friends and colleagues:


Sponsored Ads