Remix.run Logo
int_19h 2 days ago

XSLT is designed to work on the XML Infoset, which is basically just an abstract tree of elements with attributes. Which is why XSLT has e.g. HTML output method, even though you use XML snippets to generate it. If you already have logic to parse HTML into a tree, it's trivial to run XSLT on it. Indeed, most recent version of XSLT uses the same trick to process JSON even.