||New Reviews| |Software Methodologies| |Popular Science| |AI/Machine Learning| |Programming| |Java| |Linux/Open Source| |XML| |Software Tools| |Other| |Web| |Tutorials| |All By Date| |All By Title| |Resources| |About||
Keywords: Web development, HTML, CSS, XSLT, XPath, Apache Cocoon
Title: XSLT 2.0 Web Development
Author: Dmitry Kirsanov
Publisher: Prentice Hall PTR
Verdict: Some good material but title can be misleading
XML and XSLT are natural technologies to use for serious web development, they provide power and flexibility and can be used to generate highly complex web sites. However, getting all the tools and the components in place can be a daunting task for the non-expert user. Dmitry Kirsanov, a respected developer, designer and writer, sets out to show the reader how all the pieces can be put into place and also what the trade-offs are along the way.
The book opens with a chapter that describes the relationship between XML and HTML, the components of a web site, the options for setting up a site (basically a discussion of where the transformation from XML to HTML takes place) and a high-level look at how these options relate to static versus dynamic content. Most of this material is at a reasonably high-level, but the author clearly presents a series of arguments to show why the XML/XSLT route offers so many advantages.
Having convinced the reader that XSLT is a good technology to use the book moves on to more technical material in chapter two. Here we look specifically at the source definition - that is the various documents that are transformed to produce the finished product - including the importance of validation. In particular the pros and cons of the different schema options are rehearsed, and the benefits of Schematron's rule based validation are high-lighted. There is also some discussion of XML structure, including the thorny issue of element vs. attribute, namespaces, element naming and so on.
Chapter three continues the technical focus by looking in some detail at the different elements of a web site - including page structure, headings, paragraph styles, links, images and so on. The treatment is of necessity very technical and at times the text is dense, though there are plenty of examples in the text to move things along. The chapter ends with three concrete examples: a page document, the master document for the site and a Schematron schema for validation.
XSLT is properly introduced to the reader in chapter four. Given the title of the book it's surprising how little there is on this. There is a serious weakness, given the complexities of XSL transformations the book would have been more useful if an extensive XSLT/XPath tutorial had been included. As it is chapter four whizzes by in less than 20 pages, including discussion of XSLT extensions and debugging.
It's in the next chapter that the whole process - from XML source to validation to transformation - gets a run-through. Again there's a lot of focus on validation using Schematron. The stylesheet is built-up slowly, from creating the page skeleton through to menus, blocks, headers and footers, link expansions and so on. Non-XML objects, including images are also covered. The chapter ends with the creation of a shared XSLT library which puts all the various pieces together.
From then on the emphasis moves from the infrastructure and technologies to tools. Chapter 6 looks at XML software, from authoring to conversion programs to utilities to XSLT tools and batch processors. There's a wide range of software discussed, much of it open-source (and much of it Java based). The final chapter looks at the options for running the transformation on the server rather than doing it offline and uploading the results afterwards. This looks at Apache Cocoon in some detail, though the simpler (and less powerful) option of using Saxon as an XSLT servlet is examined as well.
In many respects the core chapters of the book are three and five. It's here that the XML structure of a fairly complex site is developed along with the XSLT stylesheets and schemas required to process it. This is good, solid material and even if the structure doesn't suit your requirements there are good ideas and sample code that can be re-used. However these are two chapters out of seven, and the rest of the material is of varying value.
The text is well-written, though at times it feels as if there is too much discussion of the pros and cons of the different options that are available. The author doesn't need to spend so much time justifying his choice of technologies or tools. Also, given the title, there really is very little that is specific about XSLT 2.0.
While the book contains a lot of useful material, it would have been more useful to include more generic tutorials on XSLT and XPath and to have had less on some of the other material.