throws XSLTransformException{
InputStream in;
in = XmlFormatter.class.getResourceAsStream(resource);
if (in == null) {
Logger.getLogger(XmlFormatter.class.getName()).log(Level.SEVERE, "Resource could not be loaded: " + resource);
throw new XSLTransformException("Resource could not be loaded: " + resource);
}
XSLTransformer transformer = new XSLTransformer(in);
Document foDoc = transformer.transform(sourceDoc);
return foDoc;