public static void main(String[] args) {
try {
boolean inputIsURL = false;
boolean useStdIn = false;
boolean classNameSet = false;
final GetOpt getopt = new GetOpt(args, "o:d:j:p:uxhsinv");
if (args.length < 1) printUsage();
final XSLTC xsltc = new XSLTC(true, new FeatureManager());
xsltc.init();
int c;
while ((c = getopt.getNextOption()) != -1) {
switch(c) {
case 'i':
useStdIn = true;
break;
case 'o':
xsltc.setClassName(getopt.getOptionArg());
classNameSet = true;
break;
case 'd':
xsltc.setDestDirectory(getopt.getOptionArg());
break;
case 'p':
xsltc.setPackageName(getopt.getOptionArg());
break;
case 'j':
xsltc.setJarFileName(getopt.getOptionArg());
break;
case 'x':
xsltc.setDebug(true);
break;
case 'u':
inputIsURL = true;
break;
case 's':
_allowExit = false;
break;
case 'n':
xsltc.setTemplateInlining(true); // used to be 'false'
break;
case 'v':
// fall through to case h
case 'h':
default:
printUsage();
break;
}
}
boolean compileOK;
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();
for (int i = 0; i < stylesheetNames.length; i++) {
final String name = stylesheetNames[i];
URL url;
if (inputIsURL)