Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,12 @@ public Source getSource(String filename) throws FileNotFoundException, URISyntax
{
if (filename == null) throw new IllegalArgumentException("XML file name cannot be null");
if (log.isDebugEnabled()) log.debug("Resource paths used to load Source: {} from filename: {}", getServletContext().getResourcePaths("/"), filename);
if (!filename.startsWith("/")) { filename = "/" + filename; }
URL xsltUrl = getServletContext().getResource(filename);
if (xsltUrl == null) throw new FileNotFoundException("File '" + filename + "' not found");
String xsltUri = xsltUrl.toURI().toString();
if (log.isDebugEnabled()) log.debug("XSLT stylesheet URI: {}", xsltUri);
return new StreamSource(xsltUri);
}

}
}