* @throws CheckstyleException if there is a problem when trying to configure checkstyle
* @throws DocumentException the sub-element with the checkstyle configuration cannot be converted into a new XML document
*/
private void configureCheckstyle(ConfigurationData config) throws CheckstyleException, DocumentException {
Document document = DocumentHelper.parseText(config.getSubElement("module").toString());
document.setDocType(new DefaultDocumentType("module", "-//Puppy Crawl//DTD Check Configuration 1.2//EN", "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"));
//logger.debug("Configuring checkstyle: " + document.asXML());
com.puppycrawl.tools.checkstyle.api.Configuration csc = ConfigurationLoader.loadConfiguration(
new ByteArrayInputStream(document.asXML().getBytes()),
new PropertiesExpander(new Properties()), true);
checker = new Checker();