XMLBible 34
XMLBible 34
qc
6/29/99
1:03 PM
Page 4
The tags you create can be documented in a Document Type Definition (DTD).
Youll learn more about DTDs in Part II of this book. For now, think of a DTD as a
vocabulary and a syntax for certain kinds of documents. For example, the MOL.DTD
in Peter Murray-Rusts Chemical Markup Language (CML) describes a vocabulary
and a syntax for the molecular sciences: chemistry, crystallography, solid state
physics, and the like. It includes tags for atoms, molecules, bonds, spectra, and so
on. This DTD can be shared by many different people in the molecular sciences
field. Other DTDs are available for other fields, and you can also create your own.
XML defines a meta syntax that domain-specific markup languages like MusicML,
MathML, and CML must follow. If an application understands this meta syntax, it
automatically understands all the languages built from this meta language. A
browser does not need to know in advance each and every tag that might be used
by thousands of different markup languages. Instead it discovers the tags used by
any given document as it reads the document or its DTD. The detailed instructions
about how to display the content of these tags are provided in a separate style
sheet that is attached to the document.
For example, consider Schrodingers equation:
2
2 r, t
r, t
h
ih
=
+ V(r) r, t
t
2m x2
Scientific papers are full of equations like this, but scientists have been waiting
eight years for the browser vendors to support the tags needed to write even the
most basic math. Musicians are in a similar bind, since Netscape Navigator and
Internet Explorer dont support sheet music.
XML means you dont have to wait for browser vendors to catch up with what you
want to do. You can invent the tags you need, when you need them, and tell the
browsers how to display these tags.