HELSINKI UNIVERSITY OF TECHNOLOGY Department of Computer Science and Engineering M.Sc. Thesis

Mikko Honkala

Using XML to Develop Applications for WAP and WWW Environments

Master’s Thesis submitted for official examination for the degree of Master of Science in Engineering in Espoo on March 6th, 2000

Supervisor Instructors

Professor Petri Vuorimaa Timo Vendelin, M.Sc., Petteri Stenius

I

HELSINKI UNIVERSITY OF TECHNOLOGY

ABSTRACT OF MASTER’S THESIS

Author: Title of thesis:

Mikko Honkala Using XML to Develop Applications for WAP and WWW Environments

Finnish title:

XML:n käyttö WAP- ja WWW-sovelluskehityksessä

Date:

6.3.2000

Department: Professorship:

Department of Computer Science and Engineering Tik-111 Interactive Digital Media

Supervisor: Instructors:

Professor Petri Vuorimaa Timo Vendelin, M.Sc., Petteri Stenius

Pages:

93

Application developers and content publishers are facing new challenges as an increasing number of different devices are connected to the Internet. An example of such a new device is mobile phone, capable of running the Wireless Application Protocol (WAP). WAP allows limited access to the World Wide Web (WWW). Traditionally content and applications are hand-tailored to suit the target device. As the number of different target devices grows, the need for a re-usable document description language increases. This thesis examines the use of Extensible Markup Language (XML) as such a language. This master’s thesis provides both theoretical knowledge and practical experience. It introduces the concepts of XML-based markup languages and the request/response-programming model. WAP specifications are examined closely and points on incompatibilities with WWW are described. A framework for developing WAP- and WWW-capable applications is designed and implemented. The framework uses XML as a master document language and Extensible Stylesheet Language (XSL) as a transformation language. The framework has services for presenting forms and tables in different kinds of devices. Users’ inputs to the forms automatically update the corresponding XML data structures. Other services include URL link mapping, presenting error messages, and caching. Two prototype applications are developed and described in the thesis. Both applications allow access with WWW and WAP clients. The framework with its XML/XSL model supports document re-use and multi-target publishing goals. Content presentation is consequently separated from application logic and data access. Using the framework significantly reduces the amount of programming language source code, shifting the focus from program-driven to data-driven application development. Keywords: Library code:

XML, XSL, WWW, Web, HTML, WAP, WML, application development

II

TEKNILLINEN KORKEAKOULU

DIPLOMITYÖN TIIVISTELMÄ

Tekijä: Työn nimi:

Mikko Honkala XML:n käyttö WAP- ja WWW-sovelluskehityksessä

Englanninkielinen nimi:

Using XML to Develop Applications for WAP and WWW Environments

Päivämäärä:

6.3.2000

Osasto: Professuuri:

Tietotekniikan osasto Tik-111 Vuorovaikutteinen digitaalinen media

Valvoja: Ohjaajat:

Professori Petri Vuorimaa Timo Vendelin, M.Sc., Petteri Stenius

Sivumäärä:

93

Yhä useammat erilaiset laitteet pystyvät hakemaan tietoa Internetistä. Esimerkki tällaisesta uudesta laitteesta on Wireless Application Protocol (WAP) – standardia käyttävä matkapuhelin. WAP mahdollistaa rajoitetun World Wide Web (WWW) yhteyden. Tämä luo uusia haasteita ohjelmistosuunnittelijoille ja tiedon julkaisijoille. Perinteisesti sisältö ja sovellukset suunnitellaan tiettyä kohdelaitetta varten. Kun erilaisten kohdelaitteiden määrä kasvaa, tarve siirtyä yleisempään dokumenttien kuvauskieleen kasvaa. Tässä työssä tutkitaan Extensible Markup Languagen (XML) käyttöä kuvauskielenä. Työ tarjoaa sekä teoreettista tietoa että käytännön kokemuksia aiheesta. Työ esittelee XML-pohjaisten merkkauskielien ja request/respose – ohjelmointimallin perusteet. Se tarkastelee WAP määrityksiä ja niiden yhteensopivuusongelmia WWW:n kanssa. Työssä on määritelty ja toteutettu runko WAP- ja WWW-ohjelmistojen tuottamiseksi. Sen alustana toimii olemassaoleva WWW-ohjelmistojen toteutusympäristö. Rungossa XML toimii dokumenttien kuvauskielenä ja Extensible Stylesheet Language (XSL) muunnoskielenä. Runko tarjoaa sovelluksille palvelut lomakkeiden ja taulukoiden esittämiseen erilaisilla päätelaitteilla. Käyttäjän lomakkeisiin syöttämä tieto siirretään automaattisesti XML-tietorakenteisiin. Muita tarjottuja palveluita ovat mm. URL linkkikartta, virheilmoitusten esittäminen ja puskurointi välimuistin avulla. Työssä kuvataan myös siinä toteutetut kaksi prototyyppisovellusta. Molemmat sovellukset mahdollistavat käytön sekä WWW että WAP laitteilla. Työssä toteutettu runko ja sen XML/XSL – malli havaittiin tehokkaaksi tämänkaltaisten sovellusten tuotannossa. Malli tukee dokumenttien uudelleenkäyttöä ja julkaisua monille kohdelaitteille. Tiedon esitys saadaan erotettua sekä ohjelmalogiikasta että tiedon hausta. Runkoa käyttäen ohjelmistokehitys muuttuu entistä enemmän dokumenttilähtöiseksi ja tarvittavan ohjelmakoodin määrä vähenee. Avainsanat: Kirjastokoodi:

XML, XSL, WWW, Web, HTML, WAP, WML, sovelluskehitys

III

PREFACE

This Master’s thesis is a result of the work done in Remtec Systems, Ltd. between September 1999 and March 2000. The thesis is a part of the research project Wireless Value Added Services (W-VAS). Professor Petri Vuorimaa has acted as the supervisor of this thesis, for which I present him with my gratitude. I would also like to thank my instructor Timo Vendelin for useful comments and especially for encouragement. Special thanks go to Petteri Stenius, the author of RPX Platform, for indispensable advice concerning the platform and the other aspects of application development. I am also in debt for all Remtec co-employees for the great atmosphere during the work. Thanks to Pertti Laiho for working with me in the KEWAP project and to Jussi Volanen for helping me with the RPX Table. Special thanks to Ilkka Vallinkoski for the relaxing (?) moments in the form of countless table hockey games. I would like to thank Jarmo Mäenpää, Sakari Kuusi, and Kari Huopainen at KONE Oyj for their support in the KEWAP project. I would also like to thank Mikael Honkala, who was patient enough to read my work thoroughly and give many suggestions on improvements. Finally, I wish to thank Kaisa, mom, dad and my sister Marikki for all the support during the years of my study and writing this thesis. And of course, the guys in the bands.

Mikko Honkala March 6th, 2000 Espoo, Finland

IV

Table of Contents ABSTRACT ............................................................................................................................ I PREFACE ............................................................................................................................ III TABLE OF CONTENTS.....................................................................................................IV LIST OF TERMS .................................................................................................................VI LIST OF FIGURES ......................................................................................................... VIII 1

INTRODUCTION........................................................................................................... 1 1.1 1.2 1.3 1.4

2

BACKGROUND ............................................................................................................ 1 RESEARCH PROBLEM AND GOALS OF THE THESIS ...................................................... 2 SCOPE OF THE THESIS ................................................................................................. 3 ORGANIZATION OF THE THESIS .................................................................................. 3

MARKUP LANGUAGES .............................................................................................. 4 2.1 INFORMATION AND MARKUP...................................................................................... 4 2.2 HTML ........................................................................................................................ 4 2.2.1 Cascading style sheets ........................................................................................ 5 2.2.2 HTML is not enough ........................................................................................... 6 2.3 XML .......................................................................................................................... 6 2.3.1 Overview............................................................................................................. 6 2.3.2 DTD .................................................................................................................... 9 2.3.3 DOM ................................................................................................................... 9 2.4 XSL.......................................................................................................................... 10 2.4.1 XSLT ................................................................................................................. 10 2.4.2 XSL Formatting Objects ................................................................................... 12 2.4.3 Comparison of CSS and XSL ............................................................................ 12 2.4.4 XPath ................................................................................................................ 14 2.5 WML........................................................................................................................ 14 2.5.1 WMLScript........................................................................................................ 16 2.6 DIFFERENCES BETWEEN HTML AND WML ............................................................ 16 2.7 XHTML ................................................................................................................... 17 2.8 ADAPTING CONTENT TO DIFFERENT DEVICES .......................................................... 18 2.8.1 Publishing models............................................................................................. 20 2.8.2 Re-authoring techniques................................................................................... 21

3

BROWSER-ORIENTED PROGRAMMING MODEL ............................................ 23 3.1 WWW PROGRAMMING MODEL ................................................................................ 23 3.1.1 HTTP ................................................................................................................ 24 3.1.2 URLs ................................................................................................................. 24 3.1.3 Servlets ............................................................................................................. 26 3.1.4 Session .............................................................................................................. 26 3.1.5 Comparing servlets with other technologies .................................................... 28 3.2 WIRELESS APPLICATION PROTOCOL........................................................................ 28 3.2.1 Wireless Application Environment ................................................................... 28 3.2.2 Issues with current WAP specifications............................................................ 29 3.3 DEVICE CAPABILITIES: UAPROF AND CC/PP .......................................................... 32 3.4 REMTEC RPX PLATFORM ........................................................................................ 33 3.4.1 Overview........................................................................................................... 33

V

3.4.2 3.4.3 4

Architecture ...................................................................................................... 34 XMLBase .......................................................................................................... 36

FRAMEWORK FOR DEVELOPING WAP AND WWW APPLICATIONS........ 38 4.1 REQUIREMENTS FOR THE FRAMEWORK ................................................................... 38 4.2 PRACTICAL WORK .................................................................................................... 40 4.2.1 Development environment ................................................................................ 40 4.3 NETWORK ARCHITECTURE ....................................................................................... 40 4.3.1 Modules and layers........................................................................................... 41 4.4 USING WAP SERVER AS THE APPLICATION HOST .................................................... 42 4.5 PROBLEMS WITH THE CURRENT RPX SYSTEM ......................................................... 44 4.6 ADDING WAP SUPPORT TO RPX PLATFORM .......................................................... 44 4.6.1 Distinguishing between WAP and Web requests .............................................. 44 4.6.2 Servlet forwarding ............................................................................................ 45 4.6.3 URL link mapping............................................................................................. 48 4.6.4 Error messages................................................................................................. 49 4.6.5 Session management......................................................................................... 51 4.7 CONTENT ADAPTATION FRAMEWORK ...................................................................... 52 4.7.1 XSLT transformations....................................................................................... 53 4.7.2 Form content - RPX Forms .............................................................................. 56 4.7.3 Fragmenting table data - RPX Table................................................................ 58 4.7.4 Caching............................................................................................................. 60 4.7.5 Generating content through templates ............................................................. 60 4.8 EVALUATION WITH RESPECT TO THE REQUIREMENTS ............................................. 61

5

PROTOTYPE APPLICATIONS................................................................................. 62 5.1 CONTACT DATABASE ............................................................................................... 62 5.1.1 WWW user interface ......................................................................................... 62 5.1.2 WAP user interface........................................................................................... 63 5.1.3 Contact database architecture.......................................................................... 64 5.1.4 Analysis of contact database ............................................................................ 64 5.2 KEWAP SERVICE MANUAL ..................................................................................... 65 5.2.1 Overview........................................................................................................... 65 5.2.2 WWW user interface ......................................................................................... 66 5.2.3 WAP user interface........................................................................................... 67 5.2.4 KEWAP architecture ........................................................................................ 68 5.2.5 KEWAP URLs................................................................................................... 69 5.2.6 XML content ..................................................................................................... 70 5.2.7 XSLT transformations in KEWAP .................................................................... 72 5.2.8 Navigating in the XML data ............................................................................. 74 5.2.9 Searching.......................................................................................................... 75 5.2.10 Analysis of KEWAP service manual................................................................. 77

6

CONCLUSIONS ........................................................................................................... 78 6.1

FUTURE DEVELOPMENT ........................................................................................... 79

REFERENCES ..................................................................................................................... 81 APPENDICES ...................................................................................................................... 86 APPENDIX A. EXAMPLES OF RESOLVING RELATIVE URLS................................................. 86 APPENDIX B. RPX CORE INTERFACES ................................................................................ 87 APPENDIX C. KEWAP WAP UI NAVIGATION ................................................................... 89 APPENDIX D. URL LINK MAP DEFINITION IN KEWAP....................................................... 92

VI

List of terms API

Application Programming Interface, an interface for a programmer to use a component or a program.

CC/PP

Composite Capabilities/Preferences Profile. A method for describing and transmitting information about the capabilities of WWW clients.

CSS

Cascading Style Sheets. A language for defining the appearance of an HTML or XML page.

DOM

Document Object Model. A way to manipulate XML or HTML documents in programs.

DTD

Document Type Definition. An separate document, which defines the structure of certain mark-up language documents.

HTML

Hypertext Markup Language. Currently the most common presentation language in WWW.

HTTP

Hypertext Transfer Protocol. An application-level data transfer protocol for distributed, collaborative, hypermedia information systems such as WWW.

JAVA

An object oriented programming language.

KEWAP

A prototype application developed in this thesis.

PDA

Personal Digital Assistant. A gadget that fits in hand.

RPX

A WWW application development platform developed by Remtec Systems, Ltd.

Servlet

A WWW server extension usually implemented in Java

SGML

Standard Generalized Markup Language. An ISO standard for a language for defining markup languages.

SMS

Short Messaging Service. A service in GSM networks for sending short text messages between handsets.

TCP

Transmission Control Protocol. A transfer protocol used in the Internet.

UAProf

User Agent Profile. CC/PP compatible specification from the WAPForum.

UI

User Interface. The part of an application, which is visible and the user interacts with.

URI

Universal Resource Identifier. A scheme for identifying arbitrary resource.

URL

Uniform Resource Locator. A URI for locating arbitrary resource in the Internet.

W3C

World Wide Web Consortium. A standardization body responsible for WWW development.

WAP

Wireless Application Protocol. WAP Forum’s collection of protocols for delivering WWW content to very thin clients.

VII

WAPForum

Wireless Application Protocol Forum Ltd., an industry association providing the WAP specification.

WML

Wireless Markup Language. WAP’s language for specifying content and user interface for narrowband devices.

WSP

Wireless Session Protocol. A binary version of HTTP with additional features used in WAP environment.

WSRP

RPX for Wireless Services. A framework for developing WAP and WWW applications in RPX platform.

WWW, Web

World Wide Web. Widely known Internet-based distributed hypermedia information system.

XHTML

Extensible HyperText Markup Language. W3C's effort to define HTML as a XML application.

XML

Extensible Markup Language. A simplified subset of SGML. A language for defining markup languages.

XMLBase

A high-level XML API in RPX Platform.

XSL

Extensible Stylesheet Language. W3C’s standard for transforming and styling structured documents.

XSLT

XSL Transformations. The transformation language in the XSL specificaitions.

Appliance, Terminal, Browser, Client

Any kind of device capable of connecting to the Internet, retrieving content and displaying it.

VIII

List of figures Fig. 1. Periodic table as a tree diagram [19].______________________________ 8 Fig. 2. Valid XML as a subset of Well-Formed XML [5]. _____________________ 9 Fig. 3. The result of the XSL transformation shown in a Web browser _________ 12 Fig. 4. The role of XSL and CSS ______________________________________ 13 Fig. 5. WML deck and cards. [29] _____________________________________ 15 Fig. 6. Sample WML deck navigation [29]. ______________________________ 16 Fig. 7. Section header outlining. [44]___________________________________ 22 Fig. 8. WWW programming model. [30] ________________________________ 23 Fig. 9. Establishing the base URL [55]. _________________________________ 25 Fig. 10. An interactive Web session. ___________________________________ 27 Fig. 11. WAP programming model. [30] ________________________________ 29 Fig. 12. WAP protocol layers. ________________________________________ 30 Fig. 13. UAProf Sub-graph for WAP Characteristics. ______________________ 33 Fig. 14. RPX Platform services and interfaces to application development. _____ 34 Fig. 15. RPX Platform modules and layers. _____________________________ 36 Fig. 16. Server side XSL transformation in RPX. The end user sees only HTML. 37 Fig. 17. Network architecture of WSRP framework________________________ 41 Fig. 18. Modules and layers of WSRP framework. ________________________ 42 Fig. 19. Nokia WAP server servlet architecture. __________________________ 43 Fig. 20. Forwarding using HTTP redirects. ______________________________ 46 Fig. 21. Server side servlet forwarding._________________________________ 47 Fig. 22. Server side servlet include. ___________________________________ 47 Fig. 23. RPX Error message in HTML. _________________________________ 50 Fig. 24. RPX Error message in WML capable mobile phone. ________________ 51 Fig. 25. Publishing model 3: Server associates content with presentation in ondemand fashion. [23] _______________________________________________ 53 Fig. 26. Content adaptation for different browsers. ________________________ 54 Fig. 27. RPX Forms architecture. _____________________________________ 57 Fig. 28. Contact database HTML main page. ____________________________ 62 Fig. 29. Contact database user modification form. ________________________ 63 Fig. 30. Contact database WML navigation. _____________________________ 63 Fig. 31. Documentation creation, production, and delivery processes._________ 65 Fig. 32. KEWAP Web user interface. __________________________________ 66 Fig. 33. WAP user interface. _________________________________________ 67

IX

Fig. 34. WAP UI Navigation : Spare part catalogue. _______________________ 68 Fig. 35. KEWAP system architecture. __________________________________ 69 Fig. 36. A KEWAP URL with instance data. _____________________________ 69 Fig. 37. An example of ASG XML data in KEWAP.________________________ 72 Fig. 38. A KEWAP page in WAP browser. ______________________________ 75 Fig. 39. Searching and browsing spare parts in Web UI. ___________________ 76 Fig. 40. Displaying the search results in Web UI. _________________________ 76 Fig. 41. Searching spare parts in WAP UI. ______________________________ 77 Fig. 42. WAP UI Navigation : Main.____________________________________ 89 Fig. 43. WAP UI Navigation : A, Site reference. __________________________ 89 Fig. 44. WAP UI Navigation : B, Site reference. __________________________ 90 Fig. 45. WAP UI Navigation : C, Spare part catalogue._____________________ 90 Fig. 46. WAP UI Navigation : D, ASG Manuals. __________________________ 91

INTRODUCTION

1

1 Introduction 1.1

Background

The demand for wireless data communication is growing rapidly. At the time of writing, the number of digital mobile phone subscriptions in Finland had surpassed the number of fixed phone lines. Short Message Service (SMS) is widely used in person-to-person communication. There were about 2 billion SMS messages sent in Europe alone during October 1999 [1]. SMS-based services, such as stock rates, are also in widespread use. The emphasis is now shifting: people would like to be able to browse the Internet content and use the services with their mobile phones. Other devices capable of retrieving information from the Internet in the future include handheld computers, personal digital assistants (PDAs), and set-top television boxes. Sources such as The Economist [2] predict that the sales of network appliances will significantly exceed those of personal computers after the year 2002. Consequently, within a decade, small network appliances can be expected to replace personal computers as the client device of choice for viewing Web content. Handheld wireless devices, presenting a fairly constrained computing environment compared to desktop computers, typically have: • Less powerful CPUs • Less memory (ROM and RAM) • Restricted power consumption • Smaller displays, displaying only few lines of text and only small pictures, that often lack color capabilities. • Different and more limited input devices such as phone keypad or voice inputs. These conditions will probably not change dramatically in the near future due to battery lifetime and device size factors. Wireless data networks, also presenting a more constrained communications environment compared to wired networks, have: • Less bandwidth • More latency • Less connection stability • Less predictable availability These limitations are also based on physical facts. Even as wireless technology advances, battery lifetime still limits the throughput of data to and from a wireless device [3].

INTRODUCTION

2

These limitations imply that it is usually impossible to directly port a desktop application to a wireless handheld device. Web applications are traditionally designed under the assumption that they will be accessed with a desktop computer featuring a large screen and a mouse. Existing applications need to be rewritten and new ones designed to take the limitations of these devices into account. Studies have shown that the design of small and large user interfaces requires different approach [4]. The Wireless Application Protocol (WAP) is a step towards the creation of more convenient networked applications for handheld devices. WAP is a standardization effort by Wireless Application Protocol Forum Ltd., an industry association consisting of more than 200 vendors of wireless devices, services, and tools. The goal of the WAP Forum is to provide a set of specifications that allow developers to write Internet-enabled applications that run on small form-factor, wireless devices. Typically these devices are smart phones, pagers, and PDAs.

1.2

Research problem and goals of the thesis

The goal of this thesis is to design a model for an application architect to design and implement an interactive service to be used with a WAP-capable mobile telephone. Another goal is to implement prototype applications using the model. The work is based on an existing Web programming platform. This thesis explores the feasibility of the optimal solution for handheld application design: building WAP-enabled applications by modifying the presentation layer of an existing Web application. Modular structure, separating data access, application logic, and presentation, is therefore essential in the application. Often the same application would be used with a Web and a WAP browser. In order to identify the similarities of WAP and Web worlds it is important to break down the main components of programming in the browser/server environment. Main components include structural markup languages and the request/response programming model. The presentation language is not the only difference between Web and WAP environments. The more important dissimilarities are screens, input devices, and network properties. These differences require content adaptation according to the browsing device type. There are a couple of options in constructing the WAP application infrastructure. The origin server might be connected directly into the wireless network (WAP server) or it may reside on the Internet (Web server) and communicate through a dedicated gateway. At the time of writing, there are advantages when communicating directly to the wireless network, including end-to-end security and performance factors, but the significance of these advantages will probably diminish in the future.

INTRODUCTION

1.3

3

Scope of the thesis

In this thesis, the field of mobile applications is examined from three different perspectives. Firstly, the current standards and techniques for bringing networked applications to thin clients are reviewed. These clients have very limited input and output devices and bandwidth. Secondly, the necessary requirements for modifying an existing Web development platform to serve mobile clients are derived. These requirements are then fulfilled as well as possible. Thirdly, prototype applications using the platform are built. Points on WAP infrastructure and user interface design are given but the main focus of the thesis is in the application development on the server side. While a WAP terminal communicates through a WAP gateway with the origin server using the same HTTP protocol as Web terminals, the content carried on top of this protocol must be adapted differently for each terminal type. This is best achieved by separating information content from presentation. In some cases, however, presentation affects information content. For example, a table must be divided into pages differently according to the type of browser accessing it.

1.4

Organization of the thesis

This thesis is divided into three parts. The first part (i.e., sections 2 and 3) forms the literature study of the thesis, which focuses on markup languages and the browser-oriented programming model. The second part is the applied part of the thesis. Section 4 brings together the knowledge obtained in the literature study and presents the solution. Section 5 consists of prototype applications implemented using the system described in the second part. The third part (i.e., section 6) presents the conclusions and notes on future work.

MARKUP LANGUAGES

4

2 Markup Languages 2.1

Information and markup

Information, almost always, has structure and semantics. Knowing the structure does not imply knowing the meaning or the semantics of the information but it does make automatic processing feasible. Markup is a way of adding both semantics and structure to a document. The term markup in this thesis refers to tag-based markup. Primary building blocks of markup are elements. Elements contain the information in the document and possibly other elements. They have start- and end-points marked by start- and endtags [5]. A simple marked-up greeting - element containing the text “Hello World!” looks like: Hello World!

Markup can exist on different levels of generality. D. Connolly et al. use the term “semantic markup” to differentiate from more general presentation-oriented markup: Descriptive markup indicates the role or meaning of some part of a document. While

is a generic expression of importance, is a much more specific expression. Calling the former “structure” and the latter “semantics” is indeed, a matter of semantics, but it seems clear that the more specific the markup, the more meaningful the document and the lower the potential for confusion. [6] Lie and Saarela say that: “Computer encodings of documents have long concentrated on preserving the “final form presentation”, such as a nicely laid-out paper document. Structured document formats take a different approach; rather than preserving the final form presentation, they encode the documents logical structure. Among the reasons for doing so is the preservation of device independence, document searchability, and information re-use in general”. [7]

2.2

HTML

The best-known markup language today is the Hypertext Markup Language (abbreviated HTML). Tim Berners-Lee first introduced it while working on information publishing project at CERN. Nowadays HTML is a W3C's recommended tag-based markup language for representing hyperlinked hypertext documents [8]. HTML 4.0 is an SGML (Standard Generalized Markup Language) application conforming to International Standard ISO 8879, and is widely regarded as the standard publishing language of the World Wide Web [9]. HTML was designed to be device independent. The first versions of HTML defined about 20 elements to describe document structure. These elements included document headings, titles, and paragraphs - but not margins and fonts. It was left up to the browser on any specific system to take care of rendering the document. Listing 1 shows a simple HTML document. [10]

MARKUP LANGUAGES

5

Listing 1. Example of an HTML document. Bach's home page

Bach's home page

Johann Sebastian Bach was a prolific composer



As the popularity of HTML grew, people started asking for means to describe the presentation and appearance of the document. Although the idea of style sheets existed, these presentational features were added as new tags to the HTML standard in versions 2.0 through 3.2. Putting presentation instructions, like font names and sizes, directly into documents goes against the original deviceindependence goal of HTML, and makes it hard to change the presentation later [10]. 2.2.1

Cascading style sheets

A better approach to controlling the presentation of the document is to use style sheets. They are a mechanism for defining the presentation of HTML documents. Style sheets were added to the HTML 4.0 recommendation. Presentation-oriented tags have at same time been marked as “deprecated” and it is not recommended to use them in HTML documents anymore. [8] Cascading style sheets (CSS) is one possible style sheet language. It is a W3C's recommendation. A CSS style sheet consists of instructions on how to draw the elements in the HTML document. The word “cascading” means that it is possible to have more than one style sheet. Each style sheet can inherit or override style definitions in the other sheets. CSS is a large specification consisting of more than 100 different styling properties and a model for visual formatting. Listing 2 shows an example of a CSS style sheet. [11]. Listing 2. Example of a CSS style sheet. body { background-color: #FFFFFF; margin-top: 5px; margin-left: 5px } h1 { font-family: Verdana, Helvetica, sans-serif; font-size: 18pt }

CSS can also be used with other markup languages, such as XML (cf. chapter 2.3). Korpela argues in [12] that using CSS with an arbitrary markup language would water down the possibility of user definable stylesheets and would only lead to a world of confusion.

MARKUP LANGUAGES

2.2.2

6

HTML is not enough

Simple HTML documents with style sheets such as CSS preserve device independence and accessibility while improving network performance. Still, with the advent of new Web applications like mobile access, better means of describing the semantics of the information are needed [7]. Applications that HTML is not good at include: [13]

1. Applications that require the Web client to mediate between two or more heterogeneous databases. 2. Applications that attempt to distribute a significant proportion of the processing load from the Web server to the Web client. 3. Applications that require the Web client to present different views of the same data to different users. 4. Applications in which intelligent Web agents attempt to tailor information discovery to the needs of individual users. The following chapters present the World Wide Web Consortium’s current solutions to these problems.

2.3

XML

XML was designed to provide an easy-to-write, easy-to-interpret, and easy-toimplement subset of SGML. It was not designed to provide a “one Markup Language fits all”DTD, or a separate DTD for every tag. It was designed so that certain groups could create their own particular markup languages that meet their needs more quickly, efficiently, and (IMO) logically. It was designed to put an end once and for all to the tag-soup wars propagated by Microsoft and Netscape. --- Jim Cape, in a post to comp.infosystems.www.authoring.html on June 3, 1997. [6] 2.3.1

Overview

XML (Extensible Markup Language) is a metalanguage for defining applicationspecific tag-based languages to encode structured documents [14]. XML is a subset of SGML (Standard Generalized Markup Language) defined in ISO standard 8879:1986. [15] SGML is a language for describing markup languages, particularly those used in electronic document exchange, document management, and document publishing. HTML is an example of a language defined in SGML. SGML has been around since the middle 1980's and has remained quite stable. Much of this stability stems from the fact that the language is both feature-rich and flexible. This flexibility, however, comes at a price of a level of complexity that has inhibited its adoption in many environments, including the World Wide Web. [9]

MARKUP LANGUAGES

7

XML was conceived as a means of regaining the power and flexibility of SGML without most of its complexity. Although a restricted form of SGML, XML nonetheless preserves most of SGML's power and richness, and still retains all of SGML's commonly used features [9]. The main difference between XML and SGML is that XML removes the burden of having to validate documents against a DTD; XML documents may refer to a DTD but are not required to do so. [7]. This was not well accepted in the SGML community at first. XML (like SGML) allows users to define their own tags and the structural relationship between the tags. XML does not contain any functionality, but it can be used as structured data description, interchange, and storage format. The actual XML 1.0 standard is not very big, but the XML family of standards contains a large set of standards for presenting, linking, and transforming XML documents. [16] XML documents have a logical and physical structure. The physical structure is formed by combining the various entities of the document. The entities are typically files. The entities are referred from the root document entity. The entities can be either parsed or unparsed. Parsed entities contain XML data. Unparsed entities can contain any kind of data: text, graphics, video, and so on [15]. The logical structure is a layer above the physical structure. Logically, the document is composed of declarations, elements, comments, character references, and processing instructions, all of which are indicated in the document by explicit markup. [15] XML documents are actually trees. Listing 3 displays a periodic table in XML. Fig. 1 illustrates the first half of this document as a tree.

MARKUP LANGUAGES

Listing 3. An XML periodic table with two elements, hydrogen and helium [19]. Hydrogen H 1 1.00794 20.28 13.81

Recommend Documents

Using XML to Develop Applications for WAP and WWW ...
Jun 3, 2000 - writing, the number of digital mobile phone subscriptions in Finland had surpassed the number of ...... http://server/isrp/isrp.dll/contacts/list/office?op=edit ..... RPX can be run both in Microsoft and SUN Java virtual machine.

Guide to Using Open-Source Software to Develop Web Applications
so with severe budget constraints. They need a Web infrastructure that can enable higher developer productivity .... How to Get Started with Sun's Open-Source Web Application Platform ................ 8. Learn More . ..... servers for the database se

Guide to Using Open-Source Software to Develop Web Applications
so with severe budget constraints. They need a Web infrastructure that can enable higher developer productivity .... How to Get Started with Sun's Open-Source Web Application Platform ................ 8. Learn More . ..... servers for the database se

XML Programming: Web Applications and Web ...
Listings 1 - 11 - using XML data with relational databases. • building ...... DTDs are good at design time, and they are useful as a concise description of a shared ...

XML Programming: Web Applications and Web ...
Listings 1 - 11 - a degree in Russian from an ivy league school in the United States. He has pub- ..... XML IS THE CENTRAL TECHNOLOGY of the Internet. When it first ...... All their contributions are online, together with an excellent. 74. Chapter ..

how to develop android applications pdf
how to develop android applications pdf. how to develop android applications pdf. Open. Extract. Open with. Sign In. Main menu.

Develop Advance Applications for Apple iPhone, iPa
DOWNLOAD EBOOK : BY ROB NAPIER IOS 7 PROGRAMMING PUSHING THE ... Limits: Develop Advance Applications For Apple IPhone, IPad, And IPod (1st ...

WAP for shortest path problems.pdf
There was a problem previewing this document. Retrying... Download. Connect more ... WAP for shortest path problems.pdf. WAP for shortest path problems.pdf.

oracle database 11g building oracle xml db applications pdf
oracle database 11g building oracle xml db applications pdf. oracle database 11g building oracle xml db applications pdf. Open. Extract. Open with. Sign In.

Introduction to XML
Industry standards and data exchange applications. 2. Web services, SOA data transport and message ... e.g., Phone numbers (home, office, mobile), in patient.

A Case for XML - IJEECS
butions. For starters, we propose a novel methodology for the investigation of check- sums (TAW), which we use to verify that simulated annealing and operating systems are generally incompatible. We use decen- tralized archetypes to verify that super

XML programming with SQL/XML and XQuery
agers fulfill vital responsibilities in complex informa- tion systems by ... other information-service systems. Permission to ...... Client, network, and server resources ...

A Case for XML - IJEECS
With these considerations in mind, we ran four novel experiments: (1) we measured instant messenger and RAID array throughput on our 2-node testbed; (2) we ...

XML programming with SQL/XML and XQuery - IEEE Xplore
XML programming model evolution. SAX (the simple API [application programming in- terface] for XML)1 was the first popular interface for. XML programming.

XML and MPEG-7 for Interactive Annotation and ...
Security enhanced Distributed Knowledge Management architecture. Petros Belsis, ... on the expansion of knowledge sharing capabilities, others emphasizing on .... XML files. This choice enables operational interoperability, because the ... domains (i

pdf to xml converter java
Page 1. Whoops! There was a problem loading more pages. pdf to xml converter java. pdf to xml converter java. Open. Extract. Open with. Sign In. Main menu.

Markup Language for books XML and Semantic Web ...
repository: http://code.google.com/p/booksmarkuplanguage/. II. XML AND ITS TECHNOLOGIES. I started with developing a markup language for books .... section of the XHTML document. Form controls and user interface components belong in the body of the X

pdf to xml converter for windows 7
pdf to xml converter for windows 7. pdf to xml converter for windows 7. Open. Extract. Open with. Sign In. Main menu. Displaying pdf to xml converter for windows ...

WAP-Memorandum-007
Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. WAP-Memorandum-007-Acceptance-of-ASHRAE-62-2-2013-Addendum-B.pdf. WAP-Memorandum-007-Acceptance-of-A