static { try { jcSVG = JAXBContext.newInstance("org.plutext.jaxb.svg11"); oFactory = new ObjectFactory(); Source xsltSource = new StreamSource( org.docx4j.utils.ResourceUtils.getResource( "org/pptx4j/convert/out/svginhtml/pptx2svginhtml.xslt")); xslt = XmlUtils.getTransformerTemplate(xsltSource); } catch (Exception e) { e.printStackTrace(); } }
@Deprecated // since its questionable whether this // is important enough to live in WordprocessingMLPackage, // and in any case probably should be replaced with a TraversalUtil // approach (which wouldn't involve marshal/unmarshall, and // so should be more efficient). public void filter(FilterSettings filterSettings) throws Exception { if (filterTemplate == null) { // first use Source xsltSource = new StreamSource( org.docx4j.utils.ResourceUtils.getResource( "org/docx4j/openpackaging/packages/filter.xslt")); filterTemplate = XmlUtils.getTransformerTemplate(xsltSource); } transform(filterTemplate, filterSettings.getSettings()); }