Why aren't more webpages written using XML with an XSLT stylesheet? For separating content from presentation, this combined with CSS would be even more powerful. Right now, for things like outputting a navigation menu, people often hand-copy the navmenu code from page to page or do something like
<?php include_once('myheader.inc'); ?>
on every page, which not only puts more demand on the server, but results in duplicated data transmitted.
When I was introduced to it, I was told that all major browsers back to IE6 support XSLT 1.0... are there unresolvable bugs between implementations? Are there others showstoppers or severely lacking features that are inhibiting the spread of XML+XSLT? The only website I've seen lately that is XML+XSLT is starcraft2.com.
XSLT was one of the few XMLish technologies that I actually liked. Especially for report generation the concept of XSLT with its set-based feel and ability to target all kinds of output formats (not just html) it deserves to be used more than it is today.
The reason I personally never used it was because at the time one of the browsers (I believe IE7) did not support rendering XSLT in the browser and we did not have the option of XSLT processing on the server side.
The second reason is that while its great for reporting and data presentation it wasn't really practical in terms of general purpose use.
Browsers do a piss poor job of rendering XSLT... meaning that to get it to render properly across browser, you need to render it on the server, negating any advantage you had for using it in the first place.
This means that you end up doing two conversions on the server side instead of one: data -> XML -> HTML instead of data -> HTML.
I think part of the issue is that programming in XSLT has some of the attributes of a functional language (see this answer for why it's not fully functional).
As such it requires a different approach from the 'usual' imperative mindset, and that will deter some people from fully investigating it (I'm not dismissing functional programming, btw, but in the web client/server world it's not the most common paradigm).
In the Java world it used to be perceived as being slow and memory hungry. I'm sure some of that was anecdotal, and perhaps partly the effect of early VMs. I note, however, that hardware XML accelerators are available and sit behind the JAXP interface, so perhaps there's still a speed issue ?
People who didn't live under a rock for the last ten years don't copy and paste header code or use PHP includes for layout anymore. They separate presentation from the actual code and use templating systems (eg. Smarty, a popular one for PHP) which have syntax that is easier to comprehend and reason about than XSLT.
There are a few issues regarding the adoption of XSLT, browser issues among others. For instance, the Firefox plugin NoScript, designed for blocking malicious JavaScript, also blocks XSLT on unknown pages. Don't forget that switching to a subdomain or different protocol will make IE respond to it as a violation of the same origin policy. Still, XML+XSLT, even though it's just for a limited number of cases, is quite useful. See WoW's website as an example of well-implemented XML+XSLT.
XSLT in the browser is right out because the smallest mistake in generating valid XML input could cause your page to show up blank, but there's a product called deliverance that runs on the server to make different web applications in a site share the same theme.
XSLT is surprisingly fast. It will be much faster than a typical interpreted templating language on the backend.