private Document generateTemplate() throws Exception {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = dbf.newDocumentBuilder();
Document doc = docBuilder.newDocument();
doc.appendChild(doc.createProcessingInstruction(
"xml-stylesheet", "type=\"text/xsl\" href=\"configuration.xsl\""));
doc.appendChild(doc.createComment("\n" +
" Licensed to the Apache Software Foundation (ASF) under one or more\n" +
" contributor license agreements. See the NOTICE file distributed with\n" +