Introduction to Multimedia8Chapter1HypertextNormal textLinear@"Hot spots"NonlinearFIGURE 1.1: Hypertext is nonlinear.Examples of typical multimedia applications include: digital video editing and produc-tion systems; electronic newspapers and magazines; the World Wide Web; online referenceworks, such as encyclopedias, games; groupware; home shopping; interactive TV; multi-media courseware; video conferencing; video-on-demand; and interactive movies.1.3WORLDWIDEWEBThe World Wide Web is thelargest and most commonly used hypermedia application. Itspopularity is due to the amount of information availablefrom web servers,the capacityto post such information, and the ease of navigating such information with a web browser.WWWtechnologyismaintainedanddevelopedbytheWorldWide WebConsortium(W3C),although the Internet Engineering TaskForce (IETF)standardizes the technologies.TheW3C has listed thefollowing threegoals for the WWW:universal access of web resources(by everyoneeverywhere),efectiveness ofnavigating availableinformation,andresponsi-ble use of posted material.1.3.1History of the WWWAmazingly,one of the most predominant networked multimedia applications has its rootsin nuclear physics!-As noted in the previous section, Tim Berners-Lee proposed the WorldWide Web to CERN (European Centerfor Nuclear Research) as a means for organizing andsharing their work and experimental results.The following is a short list of important datesin the creation of the WWW:
Section 1.3WorldWideWeb1960sIt isrecognizedthatdocumentsneedtohaveformatsthatarehuman-readable and thatidentify structure and elements.Charles Goldfarb,Edward Mosher, and RaymondLorie developed the Generalized Markup Language (GML)for IBM.1986 The ISO released a final version of the Standard Generalized Markup Language(SGML), mostly based on the earlier GML.1990 With approval from CERN,Tim Berners-Lee started developing ahypertext server,browser, and editor on a NeXTStep workstation. He invented hypertext markuplanguage (HTML)and the hypertext transferprotocol (HTTP)for this purpose.1993 NCSAreleasedanalpha versionof Mosaic based on theversionby Marc Andreessenfor the X Windows System.This was the first popular browser. Microsoft's InternetExplorerisbasedonMosaic.1994 Marc Andreessen and some colleagues from NCSA joined Dr.JamesH.Clark (alsothe founder of Silicon Graphics Inc.)to form Mosaic Communications Corpora-tion. In November, the company changed its name to Netscape CommunicationsCorporation.1998 The W3C accepted XML version 1.0 specifications as a Recommendation,XML isthe main focus of the W3C and supersedes HTML1.3.2HyperTextTransferProtocol (HTTP)HTTP is a protocol that was originallydesigned for transmitting hypermedia,but it alsosupports transmissionof anyfiletype.HTTPisa"stateless"requesresponseprotocol,inthe sense that a client typically opens a connection to the HTTP server,requests information,the serverresponds,and the connection is terminated-no information is carried overforthe next request.The basic request format isMethod URI VersionAdditional-HeadersMessage-bodyThe Uniform Resource Identifier (URD identifies the resource accessed, such as the hostname, always preceded by the token "http: I /". A URI could be a Uniform ResourceLocator(URL),forexample.Here, theURIcanalso includequerystrings (someinteractionsrequire submitting data).Method is a wayof exchanging information or performing taskson the URI.Two popular methods are GET and POST. GET specifies that the informationrequestedisintherequeststringitself,whilethePOsTmethodspecifiesthattheresourcepointed to in the URI should consider the message body.PosTisgenerallyused forsubmitting HTML forms.Additional-Headers specifies additional parameters aboutthe client. For example, to request access to this textbook's web site, the following HTTPmessage might begenerated:GEThttp://www.cs.sfu.ca/mmbook/HTTP/1.1
IntroductiontoMultimedia10Chapter1Thebasic responseformatisVersion Status-Code Status-PhraseAdditional-HeadersMessage-bodystatus-Code is a number that identifies the response type (or error that occurs), andstatus-Phrase is a textual description of it. Two commonly seen status codes andphrases are 200 oK when the request was processed successfully and 404 Not Foundwhen the URI does not exist.For example,in response to the example request above forthis textbook's URL, the web server may return something likeHTTP/1.1 200 OK Server:[No-plugs-here-please] Date: Wed, 25 July 200220:04:30 GMTContent-Length:1045Content-Type:text/html<HTML></HTML>1.3.3HyperTextMarkupLanguage(HTML)HTMLis a language for publishing hypermedia on the World Wide Web. It is defined usingSGML and derives elements that describe generic document structure andformatting.Sinceit uses ASCII, it is portable to all different (even binary-incompatible) computer hardware,which allows for global exchange of information.The current version of HTML is version4.01, specified in 1999. The next generation of HTML is XHTML, a reformulation ofHTMLusingXMLHTML uses tags to describe document elements. The tags are in the format <tokenparans>to define the startpointofadocumentelementand</token>todefinetheendof the element. Some elements have only inline parameters and don't require ending tags.HTMILdivides the document into a HEAD and a BODY part as follows:<HTML><HEAD></HEAD><BODY></BODY></HTML>The HEAD describes document definitions, which are parsed before any document renderingis done.These include page title,resource links, and meta-information the author decides tospecify.The BODY part describes the document structure and content. Common structureelements areparagraphs,tables,forms,links,item lists,and buttons
Section1.3WorldWideWeb11A very simple HTMLpage is as follows:<HTML><HEAD><TITLE>A sample web page.</TITLE><META NAME="Author"CONTENT ="Cranky Professor"></HEAD><BODY><P>we can putany text we like here, since this isa paragraph element.</P></BODY></HTML>Naturally,HTML has more complex structures and can be mixed with other standards.The standardhasevolvedtoallow integration withscriptlanguages,dynamicmanipulationof almost allelements andproperties afterdisplayon the client side (dynamic HTML),andmodularcustomizationof allrendering parameters using amarkup languagecalled Cascad-ing Sryle Sheets (CSS).Nonetheless, HTML has rigid, nondescriptive structure elements,and modularity is hard to achieve.1.3.4Extensible Markup Language (XML)There is a needfor a markup languagefor the WWW that has modularity of data, structure,and view. That is, we would like a user or an application to be able to define the tags(structure) allowed in a document and theirrelationship to each other, in one place,thendefinedatausingthesetags in anotherplace (theXMLfle)and,finally,define inyetanotherdocument how to render the tags.Suppose you wanted to have stock information retrievedfroma database accordingtoa user query.Using XML,you would use a global Document Type Definition (DTD)youhave already defined for stock data.Your server-side script will abideby the DTD rules togenerate anXMLdocument according to thequery,using data from your database.Finally,you will send users yourXML Sryle Sheet (XSL), depending on the type of device they useto display the information, so that your document looks best both on a computer with a21-inch CRT monitor and on a cellphone.The current XML version is XMIL 1.0, approved by the W3C in February 1998. XMLsyntaxlooks likeHTML syntax,althoughit is much stricter.Ail tags are lowercase, and atag that has onlyinline data has to terminate itself,for example,<token parans/>XML also uses namespaces, so that multiple DTDs declaring different elements but withsimilartag names canhave theirelements distinguished.DTDs canbe importedfrom URIsas well.As an example ofan XML document structure,here is thedefinitionfor a smallXHTML document:
Introduction to MultimediaChapter112<?xmlversion="1.0"encoding="iso-8859-1"?><!DOCTYPEhtm1 PUBLIC"-//W3C//DTDXHTML1.0""http://www.w3.org/TR/xhtml1/DrD/xhtm11-transition.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml">[html that follows.·the above mentionedXML rules]</html>AnXMLdocuments startwith<?xml version="ver"?>.<!DOcTYPE...>isaspecial tag used for importing DTDs. Since it is a DTD definition, it does not adhere toXML rules.xmlns defines a unique XML namespacefor the document elements.In thiscase, the namespace is the XHTML specifications web site.In addition to XML specifications, the following XML-related specifications are stan-dardized:.XML Protocol.Used to exchange XML information between processes. It is meantto supersede HTTP and extend itas well as to allow interprocess communicationsacrossnetworks..XML Schema. A more structured and powerful language for defining XML datatypes (tags). Unlike a DTD, XML Schema uses XML tags for type definitions..XSL.This is basicallyCSSfor XML.On the other hand, XSLis much more complexhaving three parts: XSLTransformations (XSLT),XMLPath Language (XPath),andXSLFormatting Objects.. SMIL: Synchronized Multimedia Integration Language, pronounced "smile"This is a particular application of XML (globally predefinedDTD)that permits spec-ifying temporally scripted interaction among any media types and user input. Forexample, it can be used to show a streaming video synchronized with a slide showpresentation, both reacting to user navigation through the slide show or video.1.3.5 SynchronizedMultimedia Integration Language (SMIL)Just as it was beneficial to have HTML provide text-document publishing using a readablemarkup language,it is also desirableto be able to publishmultimedia presentations using amarkuplanguage.Multimedia presentations haveadditionalcharacteristics: whereas in textdocuments the text is read sequentially and displayed all at once (at the same time),multi-media presentations can include many elements, such as video and audio, that have contentchanging through time, Thus,a muitimedia markup language must enable scheduling andsynchronization of differentmultimediaelementsanddefinetheseelements'interactivitywith the user