Better resource handling, richer sample XSLT