> But, why would you use XSLT to display your data within a typical web
> application? Do you go through the extra step of creating an xml document
> out of raw data from a database just to use xslt for your presentation?
Very good question, thanks!
No offence, but it seems to me that this question shows your programmer's bias
As a programmer, you see the problems that come with retrieving and processing data, but fail to see the problems associated with presenting that data. In other words, once your business logic has successfully finished, you consider the task fulfilled and the rest trivial, right? Not even close.
As a designer, I have another perspective on the whole story. From my viewpoint (of course I'm now exaggerating for the sake of the argument), it's the programming logic that is the easy part. Just run a database query and do some calculations - that's pretty straightforward. But then comes the really difficult part: we need to show the output data to the user in the most unambigous, logical, consistent, and helpful way. There's a lot to it, but the most important prerequisite is that the data I (as a designer) am working with is itself unambiguous, logical, and consistent.
And this is where XML enters the play. XML is, basically, a formalism for consistenly naming things; you see some entity, you tag it with a name that fits it. (Usually, in the process of such naming you also discover lots of problems with the consistency and logic of your data.)
Now the importance of XML in web development should be obvious: It is a common language that lets programmers send their data to designers, without each stepping on the other's toes. You (the programmer) are relieved of thinking about <td>s and <tr>s and spacers and images; you just give me your data and explain (using XML) what part of it is meant to be what. I (the designer) an relieved of thinking about how or where from this data came to be; I just take it and transform it into a presentation. Apart from being a language of communication, XML can also serve as a checkpoint which lets you make sure that the data you produce makes sense, and which lets me make sure that my transformation and presentation algorithms are indeed a good match for this data.
So, to put it simply, XML is the best way to keep sanity and maintainability of any reasonably complex information processing system, and a web application is certainly one of the model showcases for XML and XSLT. It may seem unnecessary at first, but if you actually try it you'll realize how much more elegant and modular the system becomes - and how many problems it had before
I also want to add that the programmer's viewpoint on web development is absolutely dominant in books and online writings on this topic, while a designer's perspective has much smaller presence, and an integral view that recognizes the importance of both parts of the equation and the role of XML connecting them is even rarer. This was one of the main motivations for writing my book.