My Contents

Saturday, January 30, 2010

How XML Is Used in the Real World

XML is designed to help store, structure, and transfer data; because it's written using plain text, it can be sent on the Internet and handled by software on many different platforms. XML was designed to let people circulate data. In its five years, hundreds of XML sublanguages—that is, sets of predefined XML elements—have appeared.

For example, suppose you want to perform genealogical research. To search through many genealogical records rapidly, you would need to have those records in a predetermined form, not just in any order in a simple text file. To do that, you could use a specialized XML sublanguage, Genealogical Data Communication (GEDCOM), which defines its own tags for storing names, dates, marriages, and so on. Using GEDCOM, people from all over the world can search genealogical databases rapidly.
XML sublanguages like GEDCOM are called XML applications (the term is a little unfortunate, because software packages are also called applications, but the idea is that these sublanguages are applications of XML). There are hundreds of XML applications, allowing various groups of people to communicate and exchange data. Here's a list of a few of these applications:

• Application Vulnerability Description Language (AVDL)
• Bank Internet Payment System (BIPS)
• Banking Industry Technology Secretariat (BITS)
• Common Business Library (xCBL)
• Connexions Markup Language (CNXML) for Modular Instructional Materials
• Electronic Business XML Initiative (ebXML)
• Extensible Access Control Markup Language (XACML)
• Financial Exchange (IFX)
• Financial Information eXchange protocol (FIX)
• Financial Products Markup Language (FpML)
• Genealogical Data Communication (GEDCOM)
• Geography Markup Language (GML)
• Global Justice's Justice XML Data Dictionary (JXDD)
• Human Resources Background Checks and Payroll Deductions Language (HR-XML)
• Product Data Markup Language (PDML)
• Schools Interoperability Framework (SIF)
• Telecommunications Interchange Markup (TIM)
• The Text Encoding Initiative (TEI)
• Windows Rights Management Services (RMS) by Microsoft
• XML Common Biometric Format (XCBF)
• XML Process Definition Language (XPDL) for workflow management
You can find information about XML applications like these by watching the XML news releases from W3C. The Web site http://www.xml.org/xml/marketplace_company.jsp also lists many XML applications. To get an idea of what's going on in XML these days, we'll take a look at a few of these applications next—and we're going to see more throughout this book.

Using XML: Mathematical Markup Language

Mathematical Markup Language, MathML, was designed to let people embed mathematical and scientific equations in Web pages (in fact, Tim Berners-Lee first developed the World Wide Web so that physicists could exchange papers and documents).

MathML is itself a W3C specification, and you can find it at http://www.w3.org/TR/MathML2/. Using MathML, you can display all kinds of equations, but there's only one commonly used Web browser that supports MathML—the Amaya browser, which is W3C's own testbed browser for testing new HTML elements. You can download Amaya for free from http://www.w3.org/Amaya/.

You can see a MathML document, ch01_08.ml, in Listing 1.8. This document just displays the equation 4x2 – 5x + 6 = 0.
Example 1.8. A MathML Document (ch01_08.ml)




4


x
2

-

5

x

+
6

=
0


You can see how this document looks in the Amaya browser in Figure 1.6.

Figure 1.6 A MathML document displayed by the Amaya browser.
Using XML: Chemical Markup Language

Chemical Markup Language (CML) was developed by Peter Murray-Rust and lets you view three-dimensional representations of molecules in a Jumbo browser. Using CML, one chemist can publish a visual model of a molecule and exchange that model with others.
For example, this CML document, from the CML Web site at http://www.xml-cml.org, displays the formamide molecule:



H1 C1 O1 N1 Me1 Me2
H C O N C C
0 1 0 1 3 3


C1 C1 C1 N1 N1
H1 O1 N1 Me1 Me2
1 2 1 1 1


Formamide is the simplest amide ...



This represents a
connection table
for formamide. The structure corresponds to the diagram:


H3 H1 \ / N1-C1=O1 / H2


45.03


Storeroom 12.3


We'll see CML at work tomorrow when we take a look at the Jumbo CML browser.
Using XML: Synchronized Multimedia Integration Language
Synchronized Multimedia Integration Language (SMIL, pronounced "smile") lets you customize multimedia presentations, and we'll take a look at SMIL in depth in this book. We'll even be able to create SMIL files that can be run in RealNetwork's RealPlayer (now called RealOne). SMIL is a W3C standard, and you can find more about at http://www.w3.org/AudioVideo/#SMIL.

For example, here's the beginning of a SMIL document that plays background music and displays a slide show of images and text:


"http://www.w3.org/TR/REC-smil/SMIL10.dtd">



No comments: