Package net.sf.saxon.trans

Examples of net.sf.saxon.trans.CompilerInfo


  public static String xslt(InputStream xmlInput, InputStream xsltTrasform, Map<String, String> mapParams) throws Exception {
    String strResult = "";
    try {
      Source sourceInput = new StreamSource(xmlInput);
      Source styleSource = new StreamSource(xsltTrasform);
      CompilerInfo compilerInfo = getConfiguration().getDefaultXsltCompilerInfo();
      PreparedStylesheet sheet = PreparedStylesheet.compile(styleSource, getConfiguration(), compilerInfo);
      Controller controller = (Controller) sheet.newTransformer();
      if (mapParams != null) {
        for (Entry<String, String> entry : mapParams.entrySet()) {
          controller.setParameter(entry.getKey(), entry.getValue());
View Full Code Here


  public static String xslt(String xmlInput, String xsltTrasform, Map<String, String> mapParams) throws Exception {
    String strResult = "";
    try {
      Source sourceInput = new StreamSource(new StringReader(xmlInput));
      Source styleSource = new StreamSource(new StringReader(xsltTrasform));
      CompilerInfo compilerInfo = getConfiguration().getDefaultXsltCompilerInfo();
      PreparedStylesheet sheet = PreparedStylesheet.compile(styleSource, getConfiguration(), compilerInfo);
      Controller controller = (Controller) sheet.newTransformer();
      if (mapParams != null) {
        for (Entry<String, String> entry : mapParams.entrySet()) {
          controller.setParameter(entry.getKey(), entry.getValue());
View Full Code Here

  public static String xsltFromFile(String inFilename, String xslFilename) {
    String strResult = "";
    try {
      Source sourceInput = new StreamSource(new FileInputStream(inFilename));
      Source styleSource = new StreamSource(new FileInputStream(xslFilename));
      CompilerInfo compilerInfo = getConfiguration().getDefaultXsltCompilerInfo();
      PreparedStylesheet sheet = PreparedStylesheet.compile(styleSource, getConfiguration(), compilerInfo);
      Controller controller = (Controller) sheet.newTransformer();
      StringWriter outWriter = new StringWriter();
      javax.xml.transform.Result result = new StreamResult(outWriter);
      try {
View Full Code Here

  public static void xsltFromFile(String inFilename, String xslFilename, String outFilename) {
    try {
      Source sourceInput = new StreamSource(new FileInputStream(inFilename));
      Source styleSource = new StreamSource(new FileInputStream(xslFilename));
      CompilerInfo compilerInfo = getConfiguration().getDefaultXsltCompilerInfo();
      PreparedStylesheet sheet = PreparedStylesheet.compile(styleSource, getConfiguration(), compilerInfo);
      Controller controller = (Controller) sheet.newTransformer();
      javax.xml.transform.Result result = new StreamResult(new File(outFilename));
      try {
        controller.transform(sourceInput, result);
View Full Code Here

TOP

Related Classes of net.sf.saxon.trans.CompilerInfo

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.