Page 325 - Open Soource Technologies 304.indd
P. 325
Unit 13: Extensible Markup Language
For technical purists, it is important to note that there may also be subtle differences between Notes
documents as understood by XML systems and those same documents as understood by SGML
systems. In particular, treatment of white space immediately adjacent to tags may be different.
13.1.4 Why XML?
In order to appreciate XML, it is important to understand why it was created. XML was created
so that richly structured documents could be used over the web. The only viable alternatives,
HTML and SGML, are not practical for this purpose.
SGML provides arbitrary structure, but is too difficult to implement just for a web browser.
Full SGML systems solve large, complex problems that justify their expense. Viewing structured
documents sent over the web rarely carries such justification.
This is not to say that XML can be expected to completely replace SGML. While XML is being
designed to deliver structured content over the web, some of the very features it lacks to make
this practical, make SGML a more satisfactory solution for the creation and long-time storage
of complex documents. In many organizations, filtering SGML to XML will be the standard
procedure for web delivery.
13.1.5 XML Development Goals
The XML specification sets out the following goals for XML:
1. It shall be straightforward to use XML over the Internet. Users must be able to view
XML documents as quickly and easily as HTML documents. In practice, this will only be
possible when XML browsers are as robust and widely available as HTML browsers, but
the principle remains.
2. XML shall support a wide variety of applications. XML should be beneficial to a wide
variety of diverse applications: authoring, browsing, content analysis, etc. Although the
initial focus is on serving structured documents over the web, it is not meant to narrowly
define XML.
3. XML shall be compatible with SGML. Most of the people involved in the XML effort come
from organizations that have a large, in some cases staggering, amount of material in
SGML. XML was designed pragmatically, to be compatible with existing standards while
solving the relatively new problem of sending richly structured documents over the web.
4. It shall be easy to write programs that process XML documents. The colloquial way of
expressing this goal while the spec was being developed was that it ought to take about
two weeks for a competent computer science graduate student to build a program that
can process XML documents.
5. The number of optional features in XML is to be kept to an absolute minimum, ideally
zero. Optional features inevitably raise compatibility problems when users want to share
documents and sometimes lead to confusion and frustration.
6. XML documents should be human-legible and reasonably clear. If you do not have an XML
browser and you have received a hunk of XML from somewhere, you ought to be able
to look at it in your favorite text editor and actually figure out what the content means.
7. The XML design should be prepared quickly. Standards efforts are notoriously slow. XML
was needed immediately and was developed as quickly as possible.
8. The design of XML shall be formal and concise. In many ways a corollary to rule 4, it
essentially means that XML must be expressed in EBNF and must be amenable to modern
compiler tools and techniques. There are a number of technical reasons why the SGML
LOVELY PROFESSIONAL UNIVERSITY 319