
No. 289 (January 2002)
| XHTML Essentials |
John Wiley & Sons
|
|
| XSL Essentials |
John Wiley & Sons
|
|
XHTML Essentials
The book "XHTML Essentials" is intended for those webmasters who plan to design websites for different platforms, ranging from desktop to wireless technologies. Although the book gives quite a lot of useful technical and historical background information on the various subjects considered, the reader will need some basic familiarity and experience with HyperText Markup Language (HTML), a predecessor to eXtensible HTML (or XHTML). The book explains not only "what" but also "why" and takes the reader to the very latest developments in XHTML that have occurred within the Worldwide Web Consortium (W3C), the international Web standardization body, up until early 2001.
In the early days of the Internet, documents were coded in HTML and were static and offered little or no interactivity. This book describes XHTML which now allows both dynamic contents and a high level of interactivity, increased separation of content from style, and the capability to make documents appear the same when displayed in different browsers on different platforms.
Last year, W3C agreed to replace HTML 4.01 officially with XHTML 1.0. So HTML is formally dead, though not quite, as many practical webcasters are still using it.
XHTML is a member of eXtended Markup Language (XML) family and has thus a lot of good and useful features, increasingly appreciated by the internet community. XHTML is:
However, there is no free lunch. XHTML requires obeying somewhat stricter programming rules. It may be useful here to list the five rules required:
One of the introductory sections of the book teaches how to convert existing HTML documents into new XHTML documents. Both manual and automatic methods are outlined. The validation procedure, which is not known in HTML but is essential in XHTML, is also outlined.
Some XHTML elements are not new they are already commonly used in conventional HTML: tables, forms, frames, style sheets and scripts. The book not only describes the basics for the non-initiated readers but goes a step further and explains how the elements have progressed in XHTML. Some elements have been underused so far in HTML because of the lack of browser support. With the advent of XHTML and increased browser implementation of the new standards, all these elements can now be used in our XHTML programs.
In the following sections, the principal elements are briefly compared, as they are used in HTML and XHTML:
Frames: The purpose of frames is to present to the user, multiple documents at the same time. In HTML, frames have had a long and problematic history as browsers offer poor support for them, resulting in poor user experience. Even today, many sites still do not like to use frames. The book compares the Frames DTDs (Document Type Definition) used in HTML to the strict and transitional DTDs used in XHTML.
Formatting of XHTML: The book gives an overview of cascading style sheets (CSS), as they apply to formatting XHTML documents. CSS, as developed by W3C, gives a complete and flexible control over the look and layout of a document, down to pixel-level positioning. Most of the formatting-related tags such as <b>, <i> and <u> have been removed from the XHTML specification. Attributes such as "align" are discouraged from being used. The key focus for the future developments of CSS is on modularisation. Any additions to the CSS specification would then only affect individual modules. Modularisation can be useful also for resource-constrained devices, e.g. PDAs and mobile phones, as a user agent (i.e. browser) may implement only a subset of all the functionalities.
The book does not deal in detail with CSS2 and XSL, but this is not its primary goal. The books concentrates on XHTML and advises the reader to purchase a reference book on style languages to learn more.
JavaScript: three chapters are devoted to JavaScript, which has been a popular scripting language, already available in the HTML environment, and has now become the preferred scripting language for XHTML interactive documents. Scripts are used for assessing and controlling events in web documents. Now that browsers support the Document Object Model (DOM), a true client-side dynamic HTML (DHTML) is possible. The DOM is a standard application programming interface (API) to the structure of a document that aims to make it easy for programmers to access, delete, add, or edit elements, contents, attributes and style. In the newest browsers, such as Netscape 6 and Internet Explorer 5, every element is exposed to the DOM.
The book describes the recently-released XHTML Basic standard. In the1990s, browsers were the only type of user agent. Now, the devices to which web developers deliver their content are multiple, including mobile phones, TV sets, radios, PDAs, pagers, vending machines, car navigation systems, smart watches, games consoles, digital book readers and others. In the past, developers took one of the following two approaches: a) they used the older, more widely adopted HTML 3.2 version which did not contain enhancements such as frames and scripts, or b) they developed their own language, in cooperation with the user agent and device manufacturers. The latter approach lead to the emergence of a number of new markup languages, for instance WML (Wireless Markup Language) for WAP mobile phones and Compact HTML. In addition to new languages, new browsers needed to be developed for each of the devices.
In order to avoid a proliferation of different languages and user agents, W3C proposed a new language with a common core set of elements and XHTML modules to address certain types of functionality, such as tables, forms and scripting. The modules are a subset of XHTML. This new language XHTML Basic is a slimmed-down version of XHTML and will serve as the foundation, a minimum requirements set of elements for publishing web-related content. A content created using XHTML Basic will enable the users to be able to access and read any document on most supporting devices.
The future efforts of W3C in the area of XHTML are going in the following directions:
The book provides extensive hands-on guidance and gives numerous examples and exercises to allow the reader to try the various codes. These are given on a CD-ROM, but they are not numbered and it is sometimes very difficult to find them immediately. The book provides numerous links to very useful online resources, but the companion web site http://www.wiley.com/compbooks/sauers was not yet available at the time of writing this review.
All in all, this book is a very complete and comprehensive guide to web authoring using XHTML and confirms the very high professional level of the Wiley XML Essentials series. The book is warmly recommended to both beginners and advanced webcasters.
XHTML Essentials
Michael Sauers and R. Allen Wyke
Bound volume of 383 pages
Ref: ISBN 0 471 41764-5. Price £33.50.
John Wiley & Sons, UK, 2001.
http://www.wileyeurope.com/cda/product/0,,0471417645,00.html
Franc Kozamernik
![]()
XSL Essentials
Extensible Stylesheet Language (XSL) is a member of the XML family. It is divided into two parts or specifications:
These recommendations have been produced by the Worldwide Web Consortium (W3C).
XSLT relies on yet another W3C recommendation called the XML Path Language or XPath. XPath identifies and addresses the parts or nodes of XML documents which needs to be transformed. It does so by means of location paths. XSLT is a very versatile tool, capable of extracting many documents from a single XML source file; for example, one ready for print, another for web publishing, and yet another for an online help system. From an XML document that stores text in several languages, XSLT can extract only the part of the document that contains the text in a given language.
The book gives a complete list of so-called XSLT processors, which can apply an XSLT stylesheet to an XML document. They are numerous but the best known are MSXSL, Saxon, XML Spy and XT from James Clark, the editor of the W3C XSLT specification.
The final chapter gives a brief review of the XSL technology: the seven node types, the tree data model, XSL templates, variables and parameters, working with namespaces, extensions and others. The last section entitled "A look ahead" describes the recent work of the XSL Working Group at W3C on XSLT 2.0 and XPath 2.0, and outlines some requirements for it. The standardization process on these two standards has not yet been completed.
This book is intended for XML specialists and programmers. A mere glance at the numerous examples of code listings strikes fear into the heart because it is dauntingly complex. Nevertheless, XML and XSL are exciting new technologies indeed. Although originally designed with documents in mind, I believe that XML and XSL could be considered for the exchange of any data including audio and video media.
These tools may soon become highly relevant for broadcast engineers!
XSL Essentials
Michael Fitzgerald
Bound volume of 312 pages
Ref: ISBN 0 471 41620-7. Price £33.50.
John Wiley & Sons, UK, 2001.
http://www.wileyeurope.com/cda/product/0,,0471416207,00.html
Franc Kozamernik
| European Broadcasting Union Case postale 45 Ancienne Route 17A CH-1218 Grand-Saconnex Geneva Switzerland techreview@ebu.ch |
![]() |