At the time HTML was converted from SGML to XML:
https://en.wikipedia.org/wiki/XHTML
so if you authored XHTML, you could XSLT it. There is also XHTML5, an XML serialization of HTML5. I imagine in the real world there is a great deal of web that is HTML, accepted by browser, but not XML.