Templating library for XQuery