Updated XSLT to aggregate data, adding doctype declaration to HTML output