Building Languages with XML
July 24, 2000
|
The Extensible Markup Language allows you to create custom languages
(technically called vocabularies) for particular applications, which
can be anything from a Web page to an e-commerce interface to a game to
a complete virtual world. Here's an overview of how (and why) to create
your own custom XML vocabularies, as well as examples of some existing
ones.
|
Extensible. Ponder the power of this word, for it is the crux of the new
Internet model. The next generation Net will be truly extensible, allowing
any human creation to be expressed, and accommodating any and all input and
output devices that exist or can be devised. A virtual universe infinite in
all directions. In other words, if you can dream it up, you can create it,
with
XML.
The Extensible Markup Language allows you to create custom languages
(technically called "vocabularies") for particular applications, which can
be anything from a Web page to an e-commerce interface to a game to a
complete virtual world. This capability is necessary, as no one markup
language can possibly handle every type of data.
The problem with computer languages is that they eventually become obsolete.
As new technology and new applications come into their own, the limitations
of a language start to become apparent. This usually leads to a long period
of kludgy updates and extensions, until the lingo in question (no pun
intended) collapses under its own weight.
This happened with COBOL, which linear language was superseded by
object-oriented languages such as C++, and it is happening now with
HTML. HTML works well for marking up Web
pages consisting of simple text and graphics, but it is clumsy and
inadequate when it comes to handling
streaming media,
interactive applications, advanced
database operations, and formatting content
for many different display devices.
XML provides the means to break out of this trap forever. One can design a
custom language for any application, so as new needs and new capabilities
come up, one simply creates the necessary new elements, but all within the
standard XML framework.
Note that creating a language, or vocabulary, with XML is quite a different
thing than merely expanding on HTML. At various times in the history of
HTML, new elements have been added, increasing its capabilities, but this
process has a couple of drawbacks.
The
W3C has the (unenviable) task of reviewing
proposed new HTML elements and eventually making them part of the official
spec. This procedure is simply too slow to keep up with the needs of the
real world.
The alternative is just to go ahead and build new elements into software
such as browsers, without asking anyone's approval. Various companies,
including Netscape and Microsoft, have indulged in this selfish practice,
with unfortunate results. Taken to its logical conclusion, this would
result in the creation of mutually exclusive "walled gardens", or
communities of users tied to a particular company's software - exactly the
opposite of what the Web is all about. In practice, it has created endless
problems for developers, who naturally want their work to be accessible to
everyone.
Many
WDVL articles have decried the evils of
proprietary HTML tags, so we'll rant no more on the subject. The proper
solution to the problem is of course to use XML to define new
"mini-languages", properly called "vocabularies", to meet new needs. An XML
vocabulary may be limited to a certain application, or a certain class of
device, but since it is based on the XML spec, it is not tied to the
products of any one company.
Contents:
Examples of XML Vocabularies
How to Create a Vocabulary
Why create a new vocabulary?
Building Languages with XML
Examples of XML Vocabularies
|