if (bytecodes != null) { _templates = new TemplatesImpl(xsltc.getBytecodes(), transletName, _parser.getOutputProperties(), _indentNumber, _tfactory); _templates.setURIResolver(_uriResolver);
/** * Returns the translet bytecodes stored in this template */ public synchronized Class[] getTransletClasses() { try { if (_class == null) defineTransletClasses(); } catch (TransformerConfigurationException e) { // Falls through } return _class; }
DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM();
/** * Implements JAXP's Templates.getOutputProperties(). We need to * instanciate a translet to get the output settings, so * we might as well just instanciate a Transformer and use its * implementation of this method. */ public synchronized Properties getOutputProperties() { try { return newTransformer().getOutputProperties(); } catch (TransformerConfigurationException e) { return null; } }
/** * Implements JAXP's Templates.newTransformer() * * @throws TransformerConfigurationException */ public synchronized Transformer newTransformer() throws TransformerConfigurationException { TransformerImpl transformer; transformer = new TransformerImpl(getTransletInstance(), _outputProperties, _indentNumber, _tfactory); if (_uriResolver != null) { transformer.setURIResolver(_uriResolver); } if (_tfactory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) { transformer.setSecureProcessing(true); } return transformer; }
TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); if (templates != null) { templates.setStylesheetDOM(enhancedDOM);
resetTransientAttributes(); return new TemplatesImpl(new Class[]{clazz}, transletName, null, _indentNumber, this); return new TemplatesImpl(bytecodes, transletClassName, null, _indentNumber, this); return new TemplatesImpl(bytecodes, transletName, xsltc.getOutputProperties(), _indentNumber, this);
/** * Implements JAXP's Templates.getOutputProperties(). We need to * instanciate a translet to get the output settings, so * we might as well just instanciate a Transformer and use its * implementation of this method. */ public synchronized Properties getOutputProperties() { try { return newTransformer().getOutputProperties(); } catch (TransformerConfigurationException e) { return null; } }
/** * Implements JAXP's Templates.newTransformer() * * @throws TransformerConfigurationException */ public synchronized Transformer newTransformer() throws TransformerConfigurationException { TransformerImpl transformer; transformer = new TransformerImpl(getTransletInstance(), _outputProperties, _indentNumber, _tfactory); if (_uriResolver != null) { transformer.setURIResolver(_uriResolver); } if (_tfactory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) { transformer.setSecureProcessing(true); } return transformer; }
TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); if (templates != null) { templates.setStylesheetDOM(enhancedDOM);
resetTransientAttributes(); return new TemplatesImpl(new Class[]{clazz}, transletName, null, _indentNumber, this); return new TemplatesImpl(bytecodes, transletClassName, null, _indentNumber, this); return new TemplatesImpl(bytecodes, transletName, xsltc.getOutputProperties(), _indentNumber, this);
if (bytecodes != null) { _templates = new TemplatesImpl(xsltc.getBytecodes(), transletName, _parser.getOutputProperties(), _indentNumber, _tfactory); _templates.setURIResolver(_uriResolver);
/** * Returns the index of the main class in array of bytecodes */ public synchronized int getTransletIndex() { try { if (_class == null) defineTransletClasses(); } catch (TransformerConfigurationException e) { // Falls through } return _transletIndex; }
/** * Implements JAXP's Templates.getOutputProperties(). We need to * instanciate a translet to get the output settings, so * we might as well just instanciate a Transformer and use its * implementation of this method. */ public synchronized Properties getOutputProperties() { try { return newTransformer().getOutputProperties(); } catch (TransformerConfigurationException e) { return null; } }
/** * Implements JAXP's Templates.newTransformer() * * @throws TransformerConfigurationException */ public synchronized Transformer newTransformer() throws TransformerConfigurationException { TransformerImpl transformer; transformer = new TransformerImpl(getTransletInstance(), _outputProperties, _indentNumber, _tfactory); if (_uriResolver != null) { transformer.setURIResolver(_uriResolver); } if (_tfactory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) { transformer.setSecureProcessing(true); } return transformer; }
DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM();
TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); if (templates != null) { templates.setStylesheetDOM(enhancedDOM);
resetTransientAttributes(); return new TemplatesImpl(new Class[]{clazz}, transletName, null, _indentNumber, this); return new TemplatesImpl(bytecodes, transletClassName, null, _indentNumber, this); return new TemplatesImpl(bytecodes, transletName, xsltc.getOutputProperties(), _indentNumber, this);
if (bytecodes != null) { _templates = new TemplatesImpl(xsltc.getBytecodes(), transletName, _parser.getOutputProperties(), _indentNumber, _tfactory); _templates.setURIResolver(_uriResolver);
/** * This method generates an instance of the translet class that is * wrapped inside this Template. The translet instance will later * be wrapped inside a Transformer object. */ private Translet getTransletInstance() throws TransformerConfigurationException { try { if (_name == null) return null; if (_class == null) defineTransletClasses(); // The translet needs to keep a reference to all its auxiliary // class to prevent the GC from collecting them AbstractTranslet translet = (AbstractTranslet) _class[_transletIndex].newInstance(); translet.postInitialization(); translet.setTemplates(this); if (_auxClasses != null) { translet.setAuxiliaryClasses(_auxClasses); } return translet; } catch (InstantiationException e) { ErrorMsg err = new ErrorMsg(ErrorMsg.TRANSLET_OBJECT_ERR, _name); throw new TransformerConfigurationException(err.toString()); } catch (IllegalAccessException e) { ErrorMsg err = new ErrorMsg(ErrorMsg.TRANSLET_OBJECT_ERR, _name); throw new TransformerConfigurationException(err.toString()); } }