Hacker News new | ask | show | jobs
by mcv 21 days ago
While more readable code is certainly nice, this article ignores the major advantage of XSLT being XML: you can use XSLT to generate XSLT.

And while that sounds like just a funny gimmick, it has real practical applications:

If you've got a CMS that generates HTML from XML documents, you can write the XSLT for that by hand of course. But if there are common patterns that most sites use (menus, for example), while different customers use their own custom document format, it would be really nice if you could generate that XSLT from the data model definition. Long ago I've worked on a CMS that did exactly that.