30.5. Examples of XML Technology
With XML's ability to allow customized tagging systems, it's not surprising that it is finding a wide variety of uses. It has already made a big impact on the Internet since its formal introduction in 1998. This section takes a look at just a few of the ways XML is being put to work.
30.5.1. Standard XML Languages
The World Wide Web Consortium monitors standard XML applications (languages written according to the rules of XML) that have an impact on how media is presented over the Web, thus changing the Web's capabilities. In fact, virtually all new web-related technologies and languages developed by the W3C follow the rules of XML. This section looks at the more prominent developments.
220.127.116.11. Synchronized Multimedia Integration Language (SMIL)
SMIL (pronounced "smile") is an XML language for combining audio, video, text, and graphics in a precise, synchronized fashion. It is discussed more thoroughly in Chapter 27, "Introduction to SMIL".
18.104.22.168. Scalable Vector Graphics (SVG)
XML has typically been used to define the structure of text elements within a document; however, many groups are working on ways in which it could be used to define graphical information as well. The W3C is developing the Scalable Vector Graphic (SVG) standard. According to the W3C:
SVG is a language for describing two-dimensional graphics in XML. SVG allows for three types of graphic objects: vector graphic shapes (e.g., paths consisting of straight lines and curves), images and text. Graphical objects can be grouped, styled, transformed and composited into previously rendered objects. Text can be in any XML namespace suitable to the application, which enhances searchability and accessibility of the SVG graphics. The feature set includes nested transformations, clipping paths, alpha masks, filter effects, template objects and extensibility.
The following sample SVG code (taken from the W3C Recommendation) creates an SVG document fragment that contains a red circle with a blue outline (stroke):
<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd"> <svg width="12cm" height="4cm"> <desc>Example circle01 - circle expressed in physical units</desc> <circle cx="6cm" cy="2cm" r="1cm" style="fill:red; stroke:blue; stroke-width:0.1cm" /> </svg>
The SVG standard provides ways to describe paths, fills, a variety of shapes, special filters, text, and basic animation.
Adobe offers tools for both creating and viewing SVG files. The drawing program Illustrator 9 can now export .svg files directly. Adobe's SVG Viewer is a browser plug-in available for Navigator and Internet Explorer 4 and higher for Windows and Macintosh that allows SVG files to display in the browser window.
For more information on SVG, see the W3C pages at http://www.w3.org/Graphics/SVG/.
22.214.171.124. Mathematical Markup Language (MathML)
MathML is an XML application for describing mathematical notation and capturing both its structure and content. The goal of MathML is to enable mathematics to be served, received, and processed on the World Wide Web, just as HTML has enabled this functionality for text. MathML became a formal W3C Recommendation in February 2001.
Because there is no way to reproduce mathematical equations directly using HTML, authors have resorted to inserting graphical images of equations into the flow of text. This effectively removes the information from the structure of the document. MathML allows the information to remain in the document in a meaningful way. With adequate style sheets, mathematical notation can be formatted for high-quality visual presentation. Several vendors offer applets and plug-ins that allow the display of MathML information in browser windows.
For more information, see the W3C pages at http://www.w3.org/Math/.
126.96.36.199. Resource Description Framework (RDF)
RDF is an XML application used to define the structure of metadata for documents (i.e., data that is useful for indexing, navigating, and searching a site). A formal method for describing the contents of a web site, page, or resource could be useful to automated agents that search the Web for specific information. Metadata could be used in the following ways:
RDF is in the very early stages of development as of this writing. To follow its progress, see http://www.w3.org/RDF/.
30.5.2. Other XML Applications
Some XML technologies serve a specific community, as the Chemical Markup Language serves the scientific community, but these technologies are often of limited interest to most publishers. Others are so specific that they serve only a particular intranet of a single business.
XML is poised to become a major player on the Internet. Companies are excited by the technology and have invested large amounts of time and money in its development.
The following are just a few of the ways XML is being implemented today.
Copyright © 2002 O'Reilly & Associates. All rights reserved.