D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] SGML/XML misconceptions



On Sun, Jun 16, 2002 at 10:13:51PM +0100, Roland Tarver wrote:

The only other thing I've learned so far is that XML and HTML are subsets of
SGML

That is the most common misconception there is, although there is some
truth in it. It _is_ the case that all valid XML documents are also
valid SGML documents. It's having HTML in there which is wrong. Here's
an example:

SGML is the scheme of markup defined in 3 volumes allowing you to
produce documents like this:

<fax id=12>
<head>
<to>Roly T
<number type=fax>01234 567 8910
<from>Steve
<number type=phone>+44 (0) 1234 42 42 42
</head>
<body>
<title>P A R T Y</title>
Dude, the party rocked and here's that picture you took with my camera.
<img src=/path/to/my/pics/roly/feet.jpg>
<p>Laters
</body>
</fax>

That was a document written in FAXML which is an SGML application.

XML is another scheme of markup defined in 18 pages it's a lot simpler
to implement.

<fax id="12">
<head>
<to>Roly T</to>
<number type="fax">01234 567 8910</number>
<from>Steve</from>
<number type="phone">+44 (0) 1234 42 42 42</number>
</head>
<body>
<title>P A R T Y</title>
<p>Dude, the party rocked and here's that picture you took with my camera.</p>
<img src=/path/to/my/pics/roly/feet.jpg/>
<p>Laters</p>
</body>
</fax>

That is XFAXML and is an XML application.

HTML is to SGML as XHTML is to XML.

SGML and XML are the "methods", HTML, XHTML, MUSICML, XwhateverML are
all applications.

HTH

Steve

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly