The power of XSLT is its ability to change the structure or format of any content that can be converted to XML. Java and XSLT shows you how to use XSL transformations in Java programs ranging from stand-alone applications to servlets. After an introduction to XSLT, the book focuses on applying transformations in some real-world scenarios, such as developing a discussion forum, transforming documents from one form to another, and generating content for wireless devices.
Java and XSLT discusses several common XSLT processors and the TRAX API, paying special attention to performance issues. Although there's a brief tutorial introduction to the XSLT language, the primary focus of the book isn't on learning XSLT or developing stylesheets; it's on making practical use of transformations in Java code.
The book covers:
Introduction and Technology Review
XSLT--Beyond The Basics
Java Web Architecture
Programmatic Interfaces to XSLT Processors
Using XSLT with Servlets
Discussion Forum Implementation
Advanced XSLT Web Techniques
Testing, Tuning and Development Environments
WAP and WML
XSLT and Wireless Examples
Chapter 1 Introduction
Java, XSLT, and the Web
Beyond Dynamic Web Pages
Web Browser Support for XSLT
Chapter 2 XSLT Part 1 -- The Basics
Another XSLT Example, Using XHTML
Looping and Sorting
Outputting Dynamic Attributes
Chapter 3 XSLT Part 2 -- Beyond the Basics
Parameters and Variables
Combining Multiple Stylesheets
Formatting Text and Numbers
Ant Documentation Stylesheet
Chapter 4 Java-Based Web Technologies
The Universal Design
XSLT and EJB
Summary of Key Approaches
Chapter 5 XSLT Processing with Java
A Simple Example
Introduction to JAXP 1.1
Input and Output
Chapter 6 Servlet Basics and XSLT
WAR Files and Deployment
Another Servlet Example
Stylesheet Caching Revisited
Servlet Threading Issues
Chapter 7 Discussion Forum
Prototyping the XML
Making the XML Dynamic
Chapter 8 Additional Techniques
XSLT Page Layout Templates
Session Tracking Without Cookies
Identifying the Browser
XSLT as a Code Generator
Internationalization with XSLT
Chapter 9 Development Environment, Testing, and Performance
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animals on the cover of Java and XSLT are ermines, also known as stoats or short-tailed weasels. Mustela erminea are found around the world between the Arctic Circle and approximately 40° north latitude. Their body length, not including tail, ranges from 7 to 12 inches, with proportionately sized tails from 3 to 6 inches long. They weigh between 1.5 and 11.5 ounces. Males are, on average, larger than females.
Ermines can both swim and climb trees, and though they live in such diverse habitats as grasslands, tundra, and deep forests, they tend to prefer rocky or brushy areas. They are carnivores and eat mostly rodents, but they also enjoy small rabbits and birds, fish, bugs, and eggs. (Whether they take their eggs sunny-side-up or over-easy is still a matter of great debate.)
Female ermines give birth to only one litter per year. The mating season is in the late spring, but after fertilization, the ermine embryos stop developing and do not implant in the uterus for several months. Once implantation occurs, gestation takes only about a month, and the babies are born in the spring of the year following fertilization.
Ermines can live up to eight years, but their lifespan in the wild tends to be only a year or less. Their main killer is starvation, dependent as they are on fluctuating rodent populations, but they are also preyed upon by hawks, owls, and humans.
Ermine fur, which is harvested from both M. erminea and its cousin, M. frenata, the long-tailed weasel, is specifically the fur of an ermine in winter. At this time of year, their fur is stark white except for a small black tip on the tail, leading to the blackflecked, white-fur robes favored by stylish monarchs all over the world. Matt Hutchinson was the production editor and copyeditor for Java and XSLT. Susan Carlson Greene proofread the book, and Leanne Soylemez and Emily Quill provided quality control. John Bickelhaupt wrote the index. James Carter provided production assistance.
Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.
David Futato designed the interior layout, based on a series design by Nancy Priest. Neil Walls converted the files from Microsoft Word to FrameMaker 5.5.6 using tools created by Mike Sierra. The heading font is Bitstream Bodoni, the text font is ITC New Baskerville, and the code font is Constant Willison. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. This colophon was written by Leanne Soylemez.
Whenever possible, our books use a durable and flexible lay-flat binding. If the page count exceeds this binding's limit, perfect binding is used.
I wanted to make Java applications talk to humans - through their browsers, PDAs and other client software - and Java and XSLT really showed me how to do it. It's easy to understand, even for a Java novice, and well laid out... you will learn a lot from this book.
Using XSLT and Servlets also solves the age-old browser-compatibility problem in a simple and effective way, and Chapters 8 and 10 give a good pointer towards this - though a specific example servlet to do it would be nice, maybe that would be taking the fun out of learning and experiementing!