Optimize XSLT a bit, lxml now renders it in 3s instead of 12s.