Esempio n. 1
0
  @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());
  }