9.5. Transforming XML to HTML via XSLT
Now that we've taken our application, which used to generate perfectly good HTML output, and changed it to output XML instead, what's our next step? Converting the XML back to HTML, of course. This isn't as futile as it sounds. If our only target had been HTML browsers, then we'd never have gone to XML in the first place. But starting from XML, we can target many different types of clients; just one of them happens to be the HTML browsers.
Converting from one XML-based format to another is known as a transformation. The transformation to be done is described in a document known as a stylesheet, which is itself written in an XML language known as XSL (eXtensible Stylesheet Language).
XSL is a declarative ...
Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.