I'm not sure if you can do this in just HTML. Unfortunately, as a backend developer, I'm not familiar with the new standards of the HTML5, so it may actually be doable. This should be doable in JS since I believe you can apply a transformation after the fact on an XML document.
Server side wise, this is trivial to do in a language like PHP. I wouldn't use a stylesheet myself, rather I'd use the DOMDocument object to traverse the nodes given an xpath (although there's nothing wrong with taking the XML document and force attaching the stylesheet and transforming it, and then merging it with the existing HTML structure either).
Do you have a server side processing language available to do this in?
header('HTTP/1.1 420 Enhance Your Calm');