I have been doing #XML stuff this week, specifically #TEI. I know a lot of people don't really like #XSLT, but it reminded me that when you're working with something that's not just structured data but a stream of text where some or all of the markup is part of the flow then that hybrid imperative/declarative model works really well for representing the full range of transformations you might want to make.
Would be interested to know if there are good modern alternatives.