Package org.apache.xalan.xsltc.compiler

Examples of org.apache.xalan.xsltc.compiler.XSLTC.compile()


      if (useStdIn) {
    if (!classNameSet) {
        System.err.println(new ErrorMsg(ErrorMsg.COMPILE_STDIN_ERR));
        if (_allowExit) System.exit(-1);
    }
    compileOK = xsltc.compile(System.in, xsltc.getClassName());
      }
      else {
    // Generate a vector containg URLs for all stylesheets specified
    final String[] stylesheetNames = getopt.getCmdArgs();
    final Vector   stylesheetVector = new Vector();
View Full Code Here


      url = new URL(name);
        else
      url = (new File(name)).toURL();
        stylesheetVector.addElement(url);
    }
    compileOK = xsltc.compile(stylesheetVector);
      }

      // Compile the stylesheet and output class/jar file(s)
      if (compileOK) {
    xsltc.printWarnings();
View Full Code Here

  }
  else {
      XSLTC xsltc = new XSLTC();

      xsltc.init();
      xsltc.compile(new URL(stylesheetName));
      out.println("<h1>Compilation successful</h1>");
      out.println("The stylesheet was compiled into the translet "+
      "class "+xsltc.getClassName() + " and is now "+
      "available for transformations on this server.");
  }
View Full Code Here

        outputType = XSLTC.BYTEARRAY_AND_FILE_OUTPUT;
  }

  // Compile the stylesheet
  final InputSource input = Util.getInputSource(xsltc, source);
  byte[][] bytecodes = xsltc.compile(null, input, outputType);
  final String transletName = xsltc.getClassName();

  // Output to the jar file if the jar file name is set.
  if ((_generateTranslet || _autoTranslet)
       && bytecodes != null && _jarFileName != null) {
View Full Code Here

      if (useStdIn) {
    if (!classNameSet) {
        System.err.println(new ErrorMsg(ErrorMsg.COMPILE_STDIN_ERR));
        if (_allowExit) System.exit(-1);
    }
    compileOK = xsltc.compile(System.in, xsltc.getClassName());
      }
      else {
    // Generate a vector containg URLs for all stylesheets specified
    final String[] stylesheetNames = getopt.getCmdArgs();
    final Vector   stylesheetVector = new Vector();
View Full Code Here

      url = new URL(name);
        else
      url = (new File(name)).toURL();
        stylesheetVector.addElement(url);
    }
    compileOK = xsltc.compile(stylesheetVector);
      }

      // Compile the stylesheet and output class/jar file(s)
      if (compileOK) {
    xsltc.printWarnings();
View Full Code Here

      }
  }

  // Compile the stylesheet
  final InputSource input = Util.getInputSource(xsltc, source);
  byte[][] bytecodes = xsltc.compile(null, input);
  final String transletName = xsltc.getClassName();

  // Pass compiler warnings to the error listener
  if (_errorListener != this) {
      try {
View Full Code Here

      if (useStdIn) {
    if (!classNameSet) {
        System.err.println(new ErrorMsg(ErrorMsg.COMPILE_STDIN_ERR));
        if (_allowExit) System.exit(-1);
    }
    compileOK = xsltc.compile(System.in, xsltc.getClassName());
      }
      else {
    // Generate a vector containg URLs for all stylesheets specified
    final String[] stylesheetNames = getopt.getCmdArgs();
    final Vector   stylesheetVector = new Vector();
View Full Code Here

      url = new URL(name);
        else
      url = (new File(name)).toURL();
        stylesheetVector.addElement(url);
    }
    compileOK = xsltc.compile(stylesheetVector);
      }

      // Compile the stylesheet and output class/jar file(s)
      if (compileOK) {
    xsltc.printWarnings();
View Full Code Here

        String transletName = stylesheetName.substring(0,index);
        boolean isSuccessful = true;
        try {
            File file = new File(stylesheetName);
            URL url = file.toURL();
            isSuccessful = xsltc.compile(url);
        } catch (MalformedURLException e) {
            throw new TransformerConfigurationException(
                "URL for stylesheet '" + stylesheetName +
                "' can not be formed.");
        }
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.