Package org.apache.xalan.xslt

Examples of org.apache.xalan.xslt.XSLTProcessor.process()


  StringWriter outBuffer = new StringWriter();
  XSLTResultTarget XSLoutput = new XSLTResultTarget(outBuffer)
try {
  XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
  processor.process(XSLinput, new XSLTInputSource(templateName),
                          XSLoutput);
} catch (Exception e) {
  e.printStackTrace();
}
  String result = XSLoutput.getCharacterStream().toString();
View Full Code Here


try {
  // Set up the XSLTProcessor to use XercesLiaison.
  XSLTProcessor processor = XSLTProcessorFactory.getProcessor
                                  (new org.apache.xalan.xpath.xdom.XercesLiaison());

  processor.process(XSLinput, new XSLTInputSource(templateName),
                          XSLoutput);
} catch (Exception e) {
  e.printStackTrace();
}
  String result = XSLoutput.getCharacterStream().toString();
View Full Code Here

                                                       
    try{
          XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
   
  
          processor.process(new XSLTInputSource(newsURL),
                            new XSLTInputSource("http://home.nordija.dk/news.xsl"),
                            new XSLTResultTarget(wrt));
  
   
         }
View Full Code Here

              new XSLTInputSource (urlTmp.toString());

            XSLTResultTarget xmlResult = new XSLTResultTarget (writer);

            // Perform the transformation.
            processor.process(xmlSource, xslSheet, xmlResult);

            if (usefile) {
                reader = new FileReader(pdfFile + ".tmp");
            } else {
                // create a input source containing the xsl:fo file which can be fed to Fop
View Full Code Here

        String system_id = caller.getStylesheetSystemId();
        XSLTInputSource xsl_src = new XSLTInputSource(system_id);
        OutputStream os = getOutputStream();
        try {
            XSLTResultTarget target = new XSLTResultTarget(os);
            processor.process(xml_src, xsl_src, target);
        } finally {
            os.close();
        }
    }
}
View Full Code Here

        String system_id = caller.getStylesheetSystemId();
        XSLTInputSource xsl_src = new XSLTInputSource(system_id);
        OutputStream os = getOutputStream();
        try {
            XSLTResultTarget target = new XSLTResultTarget(os);
            processor.process(xml_src, xsl_src, target);
        } finally {
            os.close();
        }
    }
}
View Full Code Here

   
    XSLTInputSource xmlID = new XSLTInputSource("foo.xml");
    XSLTInputSource stylesheetID = new XSLTInputSource("foo.xsl");
    Document out = new org.apache.xerces.dom.DocumentImpl();
    XSLTResultTarget resultTarget = new XSLTResultTarget(out);
    processor.process(xmlID, stylesheetID, resultTarget);
   
    PrintWriter pw = new PrintWriter( System.out );
    FormatterToXML fl = new FormatterToXML(pw, true);
    TreeWalker tw = new TreeWalker(fl);
    tw.traverse(out);
View Full Code Here

    // new XSLTProcessor object.
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
   
    // Have the XSLTProcessor processor object transform "foo.xml" to
    // System.out, using the XSLT instructions found in "foo.xsl".
    processor.process(new XSLTInputSource("foo.xml"),
                      new XSLTInputSource("foo.xsl"),
                      new XSLTResultTarget(System.out));
  }
}
View Full Code Here

    processor.setStylesheetParam("param1", processor.createXString(args[0]));
       
    System.out.println("------------------");
    // Have the XSLTProcessor processor object transform "foo.xml" to
    // System.out, using the XSLT instructions found in "foo.xsl".
    processor.process(new XSLTInputSource("file:foo.xml"),
                      new XSLTInputSource("file:foo.xsl"),
                      new XSLTResultTarget(System.out));
    System.out.println("\n------------------");
  }
}
View Full Code Here

        XSLTInputSource xml_src = new XSLTInputSource(caller.document);
        String system_id = caller.getStylesheetSystemId();
        XSLTInputSource xsl_src = new XSLTInputSource(system_id);
        OutputStream os = getOutputStream();
        XSLTResultTarget target = new XSLTResultTarget(os);
        processor.process( xml_src, xsl_src, target);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.