@Override public void warning(TransformerException exception) throws TransformerException { throw XMLPlatformException.xmlPlatformTransformException(exception); }
@Override public void error(TransformerException exception) throws TransformerException { throw XMLPlatformException.xmlPlatformTransformException(exception); }
@Override public void fatalError(TransformerException exception) throws TransformerException { throw XMLPlatformException.xmlPlatformTransformException(exception); }
public void fatalError(TransformerException exception) throws TransformerException { throw XMLPlatformException.xmlPlatformTransformException(exception); }
public void fatalError(TransformerException exception) throws TransformerException { throw XMLPlatformException.xmlPlatformTransformException(exception); }
public void error(TransformerException exception) throws TransformerException { throw XMLPlatformException.xmlPlatformTransformException(exception); }
public void warning(TransformerException exception) throws TransformerException { throw XMLPlatformException.xmlPlatformTransformException(exception); }
public JAXPTransformer() { super(); try { TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformer = transformerFactory.newTransformer(); } catch (TransformerConfigurationException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Node sourceNode, ContentHandler resultContentHandler) throws XMLPlatformException { try { XMLNode xmlNode = (XMLNode)sourceNode; xmlNode.reportSAXEvents(resultContentHandler); } catch (SAXException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Source source, Result result) throws XMLPlatformException { try { if ((result instanceof StreamResult) && (isFragment())) { transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); } transformer.transform(source, result); } catch (TransformerException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Node sourceNode, ContentHandler resultContentHandler) throws XMLPlatformException { try { XMLNode xmlNode = (XMLNode)sourceNode; xmlNode.reportSAXEvents(resultContentHandler); } catch (SAXException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Document sourceDocument, Node resultParentNode, URL stylesheet) throws XMLPlatformException { try { TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformerFactory.setErrorListener(new TransformErrorListener()); StreamSource stylesheetSource = new StreamSource(stylesheet.openStream()); Transformer transformer = transformerFactory.newTransformer(stylesheetSource); DOMSource source = new DOMSource(sourceDocument); DOMResult result = new DOMResult(resultParentNode); transformer.transform(source, result); } catch (Exception e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Document sourceDocument, Node resultParentNode, URL stylesheet) throws XMLPlatformException { try { TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformerFactory.setErrorListener(new TransformErrorListener()); StreamSource stylesheetSource = new StreamSource(stylesheet.openStream()); Transformer transformer = transformerFactory.newTransformer(stylesheetSource); DOMSource source = new DOMSource(sourceDocument); DOMResult result = new DOMResult(resultParentNode); transformer.transform(source, result); } catch (Exception e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Node sourceNode, OutputStream resultOutputStream) throws XMLPlatformException { try { OutputStreamWriter resultWriter = new OutputStreamWriter(resultOutputStream, getEncoding()); transform(sourceNode, resultWriter); } catch (UnsupportedEncodingException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
@Override public void transform(Document sourceDocument, Node resultParentNode, URL stylesheet) throws XMLPlatformException { try { TransformerFactory transformerFactory = XMLHelper.createTransformerFactory(false); transformerFactory.setErrorListener(new TransformErrorListener()); StreamSource stylesheetSource = new StreamSource(stylesheet.openStream()); Transformer transformer = transformerFactory.newTransformer(stylesheetSource); DOMSource source = new DOMSource(sourceDocument); DOMResult result = new DOMResult(resultParentNode); transformer.transform(source, result); } catch (Exception e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Node sourceNode, OutputStream resultOutputStream) throws XMLPlatformException { try { OutputStreamWriter resultWriter = new OutputStreamWriter(resultOutputStream, getEncoding()); transform(sourceNode, resultWriter); } catch (UnsupportedEncodingException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Source source, Result result) throws XMLPlatformException { try { if ((result instanceof StreamResult) && (isFragment())) { getTransformer().setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); } getTransformer().transform(source, result); } catch (TransformerException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
@Override public void transform(Source source, Result result) throws XMLPlatformException { try { if ((result instanceof StreamResult) && (isFragment())) { getTransformer().setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); } getTransformer().transform(source, result); } catch (TransformerException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Document sourceDocument, Node resultParentNode, URL stylesheet) throws XMLPlatformException { try { XSLProcessor xslProcessor = new XSLProcessor(); XSLStylesheet xslStylesheet = xslProcessor.newXSLStylesheet(stylesheet); XMLDocument xmlDocument = (XMLDocument)sourceDocument; XMLDocumentFragment resultDocumentFragment = xslProcessor.processXSL(xslStylesheet, xmlDocument); resultParentNode.appendChild(resultDocumentFragment); } catch (XSLException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }
public void transform(Document sourceDocument, Node resultParentNode, URL stylesheet) throws XMLPlatformException { try { XSLProcessor xslProcessor = new XSLProcessor(); XSLStylesheet xslStylesheet = xslProcessor.newXSLStylesheet(stylesheet); XMLDocument xmlDocument = (XMLDocument)sourceDocument; XMLDocumentFragment resultDocumentFragment = xslProcessor.processXSL(xslStylesheet, xmlDocument); resultParentNode.appendChild(resultDocumentFragment); } catch (XSLException e) { throw XMLPlatformException.xmlPlatformTransformException(e); } }