Package net.sf.saxon.jdom

Examples of net.sf.saxon.jdom.DocumentWrapper


  public Document transform(String xslt, Document input) throws FitsToolException {
    Document doc = null;
    try {
      Configuration config = ((TransformerFactoryImpl)tFactory).getConfiguration();
      DocumentWrapper docw = new DocumentWrapper(input,null,config);
      JDOMResult out = new JDOMResult();
      Templates templates = tFactory.newTemplates(new StreamSource(xslt));
      Transformer transformer = templates.newTransformer();
      transformer.transform(docw, out);
      doc = out.getDocument();
View Full Code Here


      if (xsltParams != null)
      {
        for (int i= 0; i < xsltParams.length; i++)
          transformer.setParameter(xsltParams[i][0], xsltParams[i][1]);
      }
      DocumentWrapper docw= new DocumentWrapper(doc, "", ((Controller) transformer).getConfiguration());
      Result result= new StreamResult(writer);
      transformer.transform(docw, result);

      return new OutputFile(writer.toString());
    }
View Full Code Here

      if (xsltParams != null)
      {
        for (int i= 0; i < xsltParams.length; i++)
          transformer.setParameter(xsltParams[i][0], xsltParams[i][1]);
      }
      DocumentWrapper docw= new DocumentWrapper(doc, "", ((Controller) transformer).getConfiguration());
      Result result= new StreamResult(writer);
      transformer.transform(docw, result);

      return new OutputFile(writer.toString());
    }
View Full Code Here

        // Build the JDOM document
        SAXBuilder builder = new SAXBuilder();
        Document doc = builder.build(new File(sourceID));

        // Give it a Saxon wrapper
        DocumentWrapper docw = new DocumentWrapper(doc, sourceID, new Configuration());

        // Retrieve all the ITEM elements
        XPathEvaluator xpath = new XPathEvaluator(docw);
        Iterator iter = xpath.evaluate("//ITEM").iterator();
View Full Code Here

TOP

Related Classes of net.sf.saxon.jdom.DocumentWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.