A Complete Guide to Web Design

(やまだぃちぅ) #1
448 Chapter 25 – Introduction to XML

Examples of XML Technology


Web Design in a Nutshell, eMatter Edition

by browsers, without parsing, you can add dummy end tags to empty elements, so
<hr> becomes<hr></hr>.

Examples of XML Technology


With XML’s ability to allow customized tagging systems, it is not surprising it is
finding a wide variety of applications. Many XML languages are so specific that
they will serve only a particular Intranet of a single business. Other XML technolo-
gies might serve a specfic community, as the Chemical Markup Language serves
the scientific community but is of limited interest to most publishers.
The World Wide Web Consortium monitors other XML applications that have a
greater impact on how media is presented over the Web, thus changing the Web’s
capabilities. Two such applications are used for the synchronized multimedia
presentations and a method for describing vector-based graphics in Web pages.

Multimedia Presentations with SMIL


SMIL (Synchronized Multimedia Integration Language) is a language for combining
audio, video, text, and graphics in a precise, synchronized fashion. The SMIL 1.0
specification, released in June, 1998, is one of the first XML-based DTDs proposed
by the W3C.
The SMIL file (using tags that follow the XML syntax) instructs the client to retrieve
media elements that reside on the server as standalone files. The advantages of
SMIL include the ability to:


  • Add hyperlinks in a time-based presentation

  • Integrate media elements from more than one server

  • Reuse media elements in multiple presentations

  • Allow users to choose the media tracks they prefer, for example, based on
    connection speed or language preferences


How SMIL works

The SMIL DTD contains tags that control the presentation’s layout and timeline. In
the past, timing events over the Web required developers to write in JavaScript,
Java, or proprietary development tools such as Flash or Shockwave. With SMIL,
developers can experiment with time and space in a declarative, rather than
programmatic, way.
Examples of SMIL’s powerful declarative syntax are the parallel(<par>) and
sequential (<seq>) tags. Media elements enclosed within<par>tags are played in
parallel while media elements enclosed within<seq>tags are played sequentially.
These two tags, used in different combinations, give web developers broad control
over a multimedia timeline. For instance, you can have an audio file play while
still images are shown for three seconds each in sequential order, as shown in the
following code example:
<PAR>
<!--audio_file.wav is a 9 second audio file-->
Free download pdf