Study the RSS 1.0 to HTML Transformations: More Ways to Style It!
example by Yi-Hong Chang and Tyng-Ruey Chuang.
This new version uses client-side ECMAscript for dynamic selection of stylesheets.
The server-side PHP code is also simplified.
Live:
http://pomelo.iis.sinica.edu.tw/~trc/play/xslt/v2/
Code: xslt-v2.tgz.