Author: Eric Richardson Date: Subject: XML - Practical uses?
Trent Shipley wrote: > <clip> >
> First, SGML is less machine friendly than XML, but its complex rules don't
> actually make it human friendly. The O'Reily Nutshell handbook says that
> several important SGML DTD, including DOCBOOK, are being re-defined, to the
> extent possible, in XML. In general, there seems to be a consensus emerging
> that one should not do in SGML what can be done in XML. SGML is more human reader friendly and less machine reader friendly.
The is because SGML is more flexibly and allows tag minimization such as
the <br> tag in HTML. HTML is considered an application of SGML.
XML is more machine reader friendly and less human reader friendly. XML
has much more strict rules than SGML so the machine parsing is easier.
<br/> in XML. If you write Web pages in XHMTL write the tag as <br /> as
the browsers will parse it correctly.
<clip> >
> In fact, XML isn't a replacement for anything. It is a supplement to SGML.
> Ultimately, XML is about defining subsets of XML (like XHMTL) that are then
> written in the dialect of XML that you just defined. XML doesn't actually
> *do* anything. It is just markup. If you want something interesting to
> happen to an XML document you will need some applications....
XML is called a formal subset of SGML. In fact they modified the SGML
spec so that XML could be a formal subset. XHTML is an application of
XML. Fancy way of saying that it conforms to a DTD which restricts the
markup to a certain set of elements and attributes and also the order
nesting and cardinality.