tailieunhanh - programming XML by Example phần 4

Hiện nay, hầu hết mọi người truy cập web thông qua trình duyệt trên máy tính Windows. Một số người sử dụng máy Apple Mac, những người khác sử dụng máy trạm làm việc UNIX. Điều này sẽ thay đổi trong tương lai như nhiều người hơn với các thiết bị chuyên ngành. | 144 Chapter 5 XSL Transformation Customized Views Currently most people access the Web through a browser on a Windows PC. Some people use Macintoshes others use UNIX workstations. This will change in the future as more people turn to specialized devices. Already WebTV has achieved some success with a browser in a TV set. Mobile phones and PDAs such as the popular PalmPilot will be increasingly used for Web browsing. Ever tried surfing on a PalmPilot It works surprisingly well but on the small screen many Web sites are not readable enough. One solution to address the specific needs of smaller devices might be to use XHTML an XML simplified version of HTML. XHTML is based on HTML but it has an XML syntax as opposed to an SGML syntax . It is also designed to be modular as it is expected smaller devices will implement only a subset of the recommendation. According to the W3C these new platforms might account for up to 75 of Web viewing by the year 2002. What can you do about it Will you have to maintain several versions of your Web site one for existing Web browsers and one for each new device with its own subset XSL to the rescue It will be easy to manage the diversity of browsers and platforms by maintaining the document source in XML and by converting to the appropriate XHTML subset with XSLT. In essence this is how I manage the e-zine. Figure illustrates how this works. Figure Maintain one XML document and convert it to the appropriate markup language. Where to Apply the Style Sheet 145 Where to Apply the Style Sheet So far we have converted the XML documents before publishing them. The client never sees XML it manipulates only HTML. Today this is the realistic option because few users have an XML-enabled browser such as Internet Explorer or a beta version of Mozilla Mozilla is the open source version of Netscape Communicator . Furthermore the XSL recommendation is not final yet so implementations of XSL processors are not always compatible with one

TỪ KHÓA LIÊN QUAN