com.sun.org.apache.xalan.internal.xsltc.cmdline: public final class: Transform

{ try { if (args.length >, 0) { int i, int iterations = -1, boolean uri = false, debug = false, boolean isJarFileSpecified = false, String jarFile = null, // Parse options starting with '-' for (i = 0, i <, args.length && args[i].charAt(0) == '-', i++) { if (args[i].equals('-u')) { uri = true, } else if (args[i].equals('-x')) { debug = true, } else if (args[i].equals('-j')) { isJarFileSpecified = true, jarFile = args[++i], } else if (args[i].equals('-n')) { try { iterations = Integer.parseInt(args[++i]), } catch (NumberFormatException e) { // ignore } } else { printUsage(), } } // Enough arguments left ? if (args.length - i <, 2) printUsage(), // Get document file and class name Transform handler = new Transform(args[i+1], args[i], uri, debug, iterations), handler.setJarFileInputSrc(isJarFileSpecified, jarFile), // Parse stylesheet parameters Vector params = new Vector(), for (i += 2, i <, args.length, i++) { final int equal = args[i].indexOf('='), if (equal >, 0) { final String name = args[i].substring(0, equal), final String value = args[i].substring(equal+1), params.addElement(new Parameter(name, value)), } else { printUsage(), } } if (i == args.length) { handler.setParameters(params), handler.doTransform(), } } else { printUsage(), } } catch (Exception e) { e.printStackTrace(), } } Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 22, 2016 @ 4:01 am