ADAPTING CONTENT IN A PORTAL OF ACADEMIC INFORMATION BASED ON XML and PHP Eduardo Carrillo, Sergio H. Guerrero, German A. Pabón, J. Javier Samper, Javier Martínez Universidad Autónoma de Bucaramanga (COLOMBIA) Universidad de Valencia (SPAIN) Abstract With the consolidation of Internet as a means to share information in the new society and the need for accessing such information from mobile devices, such cellular telephones, PDAs, WebTVs, Playstations, and others, we are now facing the problem of making extra work in projects that generate contents for the Internet to be visualized in traditional browsers and in devices with small size and available memory. The present paper deals with the problem described above from an academic perspective. The paper also tries to explain the strategy used and the technologies of public dominion that gave support to the work carried out for the development of a dynamic application that can be executed from PCs with Web browsers and from mobile devices. The framework that was being designed is based on the different models of celluar telephones with Internet capabilities available in Colombia. Keywords: Wireless Applications, WAP, XML, XHTML, XSLT, PHP INTRODUCTION Problems related to the lack of standardization in presenting Internet contents and of alternatives available in hardware as well as in software have been present from their beginning [5]. For software, for example, it has been observed that the different navigators that have been used to access the contents of the Web did not support the same markup tags used in the different HTML (Hipertext Markup Language) versions. Content developers have to face the difficulty of offering designs that made it possible adaptation to the different screen resolutions on their possible visitors as well as the variety of the navigator versions. Content developers even had to give the following message: "Web site optimized for navigator x, version and resolution z ". The idea of accessing the Internet without having to use a PCs is a reality thanks to the mobile devices with technologies such as WAP (Wireless Application Protocol), Imode, Palm, among others [7,8]. In the case of WAP, a language called WML (Wireless Markup Language) , based on XML (Extensible Markup Language) has been used while for Imode CHtml (Compact Hypertext Markup Language) has been utilized. Both of them have being defined taking into account the limitations of the devices and the limited bandwidth initially available. A new challenge in the homogenous development of interfaces was to overcome the differences in visualization between the Web browsers and the microbrowsers present in the mobile devices. The presence of the XML standard has allowed separate presentation from content while, at the same time, organization has been imporved. The XML standars has also made it possible interchange of data between the new sites that are developed, although there still exists a drawback regarding other versions in the navigators. On the other hand, the W3C consortium has suggested the use of XHTML (eXtended Hypertext Markup Language), so a document codified in XHTML can be seen from mobile devices, personal computers and others, taking advantages of HTML, cHTML, WML and XML, while maintaining compatibility with mobile devices. In a recent specification of the W3C, a series of modules that identify subgroups of the complete language have been indicated, simplifying the identification of the particular functionalities that a device has. The development of XHTML has been thought so as to have a unique markup language for devices with small screen and low processing capacity. For that purpose it is necessary to have devices that carry a minimum number of the XHTML modules [10,11]. As Academic experience, it was decided to deal with the problem of compatibility in spite the few cellular telephones models that allow access to Internet in Colombia. The project was implemented with a view to considering the development of new projects related to the presentation of contents for the Internet in the future. The present paper summarizes the experience developed in the construction of a dynamic application for the Internet that allowed having access to an existing database from different models of mobile devices and from Web browsers and clients with support for XHTML avoiding the rewriting of the application for each type of client. Additionaly the evaluations was then carried out to check on type of client that made the request and accessed the data of an XML document associated to the data of the database. The format of presentation was only varied bearing in mind the client's characteristics. DESCRIPTION OF THE TASK DEVELOPED The test portal that was developed allows to enter the Virtual Education Services [9] that University Autonoma de Bucaramanga offers to the students who, as a basic level users, can chek the information on board and results of their exams. The interface of the database maintenance directed to the administrative level user was only made available through the Web interface, due to the troublesome work that implies the intensive editing of data from mobile devices. The strategy used consisted in having access to the data from a Web server using a technology that gave support to the development of dynamic applications and the XML standard in order to obtain to the separation between content and presentation. The visualization format of the same document was defined by means of XSL, which also make it also possible to filter the information to be visualized in agreement with predefined criteria [12]. It is possible to codify XSL using suitable techniques as XSLT (Extensible Style Language Transforamtions), it permits transform the structure or the content of an XML document into almost any format and to define the visualization style. In order to obtain a transformation it is necessary to take data codified in XML, a suitable XSL style sheet, an XML analyzer and a XSLT processor, the last two working at the same time. In this the XSLT processor produces a transformed XML document, a document codified in HTML, in XML or in any other markup language. The data through are then used by some application with specific purposes, such as a Web navigator a WAP micronavigator WAP. TECHNOLOGY For the development of the prototype object-oriented philosophy was used as the approach of analysis and design of software, and the application was designed using UML (Unified Modeling Language) [1,4]. The technologies that were used to develop the nucleus of the project were: - Operating system: Linux, Redhat version 7,1 (kernel 2,4,2-2) - Server HTTP: Apache v 1.3.19 - Database Management System: MySQL v. 3.23.37 - Development of dynamic applications Web: PHP (Hipertext Processor) v 4,0,6 , with extensions for support to XML. The client/server database management system selected was MySQL, a server multithread based on the standard SQL, (Structures Query Language). This system, although it does not allow an appropriate support for developments at an great scale due to its limitation in handling of stored procedures, it is nevertheless and appropriate option for test developments. PHP acts as an interpreted language of high level, whose scripts can be embedded in documents codified in a markup language of and executed in the Web server PHP is shaped as a module of the Web server Apache through the CGI (Common Gateway Interface) gateway and allows interaction with different database management systems [3]. The PHP functionalities can be increased by means of extensions, that is, groups of functions that can be activated when settling or by means of directives that are defined in the associated configuration file. In the case of interaction with XML, it is required an extension to interpret and validate documents codified in XML. For that purpose were used XML analizers, available in some distributions of Linux. In order to develop transformations of documents codified in XSL an additional extension was employed. OPERATION OF THE SOLUTION When the application is loaded, scripts written in PHP excute the dynamic queries to the database and codified data are spawned in XML, wich are later presented in the appropriate format by means of archives XSL (transformations for each one of documents in formats WML, XHTML and HTML). One of the main processes consists in identifying the client who makes the request. This is obtained by making an evaluation of the environment variable $HTTP_ACEPT, wich contains the value of the MIME (Multipurpose Internet Mail Extensions) contents that accepts this client. If it is identified that the client has support for WML, the environment variable HTTP_USER_AGENT is examined, which differentiates the navigator or emulator used. In a diffeten case, the same variable that identifies if the navigator used is compatible with XHTML is evaluated. If this so, the data will be transformed into XHTML or into HTML. For the period of time when the project is developed, only the browser compatible with HTML 4.0 capabilities is able of opening information codified in XHTML 1.0, due to the fact that specifications of the latter still preserve their elements of the last version of HTML 4.0. To carry out test, both Web browsers with support for XHTML as well as emulators of mobile devices were employed. CONCLUSIONS In this paper, the problem of generation content adaptable to a variety of clients has been approached, using technologies of free distribution and presenting the main standards associated. We also provide a guidelines on how to extend existing web applications to leverage XML and show an examples of how to expose a data stored in a relational database into XML. XML as a markup language is seen as the best format used for the exchange of ata among applications and components of applications. It is necessary to carry out a permanent evaluation of the alternatives available for the development of contents adaptable to the client. As important point is to develop manufacturer independent solutions to access databases that can be integrated in an single portal development, no matter if it is done for wired o wireless Internet. From the tests made the objective sought was reached. It implied obtaining a high degree of scalability in relation to managing interfaces and the possibility of giving support to the format that is supported by new devices. In spite of the success, It was observed a new difficulty related to the real potential of the user`s concurrence in the process XML documents dynamically generated. BIBLIOGRAPHY [1] Booch G., Jacobson I., Wumbaught J. The Unified Modeling Language Users Guide. Addison Wesley, 1998. [2] Carrillo E., Samper J. Javier, Felici S. Migrating Web Applications To WAP. Third International Conference on Information Integration and Web-based Applications & Services (IIWAS 2001). Linz, Austria, September, 2001. [3] Carrillo E. Server-Side Scripting With Databases Using ASP, PHP, Cold Fusion and Java Servlets. 5th WSES/IEEE World Multiconference on Circuits, Systems, Communications & Computers (CSCC 2001), Crete, Greece, September, 2001. [4] Conallem, Jim. Building Web Applications with UML. Addison-Wesley, 1999. [5] Device Independence Activity, http://www.w3.org/2001/di/. Jun, 2001. [6] Extensible Markup Language (XML), http://www.w3.org/XML/. 10 de Septiembre de 2001. [7] Jing Jin, Helal Abdelsalam, Elmagarmid Ahmed.Client-Server Computing in Mobile Environments. ACM Computing Surveys, Vól.1,June, 1999. [8] Television Interest Group, http://www.w3.org/TV/TVWeb/. [9] Virtual Education UNAB.http://eduvirtual.unab.edu.co/ [10] WirelessDev.Net. XML and XHTML. http://www.wirelessdevnet.com/channels/wap/training/xslt.html. [11] XHTML 1.1 - Module-based XHTML, http://www.w3.org/TR/xhtml11. [12] XSL Transformations (XSLT), http://www.w3.org/TR/xslt.html.