Writer writer = null;
try {
String name = type.filename(targetTaglib, packageElement.getQualifiedName().toString(), taglibAnnotation.name());
FileObject resource = processingEnv.getFiler().createResource(StandardLocation.SOURCE_OUTPUT, "", name);
info("Writing to file: " + resource.toUri());
writer = resource.openWriter();
TransformerFactory transFactory = TransformerFactory.newInstance();
transFactory.setAttribute("indent-number", 2);
Transformer transformer = transFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");