if (xslStyleSheetURI == null) {
// Assume that the input file is a literal result template
xslStyleSheetURI = uri;
}
ParsedURL parsedXSLStyleSheetURI
= new ParsedURL(uri, xslStyleSheetURI);
Transformer transformer
= tFactory.newTransformer
(new StreamSource(parsedXSLStyleSheetURI.toString()));
// Set the URIResolver to properly handle document() and xsl:include
transformer.setURIResolver
(new DocumentURIResolver(parsedXSLStyleSheetURI.toString()));
// Now, apply the transformation to the input document.
DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;