/** * Compile a {@link Templates} from a given stream. The template is not added to the pool * automatically. */ public Templates compileTemplate(InputStream stream) throws SAXException { final StreamSource source = new StreamSource(stream); try { return tFactory.newTemplates(source); } catch (Exception e) { throw new SAXException("Could not compile stylesheet.", e); } }
/** * Compile a {@link Templates} from a given system identifier. The template is not added to the * pool, a manual call to {@link #addTemplate(String, Templates)} is required. */ public Templates compileTemplate(String systemId) throws SAXException { final StreamSource source = new StreamSource(systemId); try { return tFactory.newTemplates(source); } catch (Exception e) { throw new SAXException("Could not compile stylesheet: " + systemId, e); } }
/** @return returns the identity transformer handler. */ public TransformerHandler getIdentityTransformerHandler() throws TransformerConfigurationException { return tFactory.newTransformerHandler(); }