in = new URL(url).openStream();
    public static void main(String[] args) {        try {            boolean compact = false;            String parserName = "ss";            InputStream in = System.in;            OutputStream out = System.out;            int idx = 0;            if (idx < args.length) {                if ("-c".equals(args[idx])) {                    idx++;                    compact = true;                }            }            if (idx < args.length) {                if ("-p".equals(args[idx])) {                    if (++idx < args.length) {                        parserName = args[idx++];                    } else {                        error("-p option requires an argument");                    }                }            }            CSSParserFactory parserFactory = null;            if ("ss".equals(parserName)) {                parserFactory = new SteadyStateCSSParserFactory();            } else if ("flute".equals(parserName)) {                parserFactory = new FluteCSSParserFactory();            } else if ("batik".equals(parserName)) {                parserFactory = new BatikCSSParserFactory();            } else {                error("Invalid parser name: " + parserName);            }            if (idx < args.length) {                try {                    String url = args[idx++];                    if (!"-".equals(url)) {                        if (url.indexOf("://") == -1) {                            url = "file:///" + new File(url).getAbsolutePath();                        }                        in = new URL(url).openStream();                    }                } catch (Exception e) {                    error("Error opening input URL", e);                }            }            if (idx < args.length) {                try {                    if (!"-".equals(args[idx])) {                        out = new FileOutputStream(args[idx]);                    }                } catch (Exception e) {                    error("Error opening output file", e);                }            }            DefaultPipelineFactory pipelineFactory = new DefaultPipelineFactory();            pipelineFactory.setGeneratorFactory(new CSSParserGeneratorFactory(                    SAXCSSDocumentHandler.DEFAULT_NAMESPACE_PREFIX, parserFactory));            if (compact) {                InputStream sis = Main.class.getResourceAsStream("compact-xcss.xsl");                pipelineFactory.addTransformerFactory(new TraxTransformerFactory(new StreamSource(sis)));            }            pipelineFactory.setSerializerFactory(new ApacheXMLSAXSerializerFactory());            Pipeline pipeline = pipelineFactory.newPipeline();            pipeline.execute(new InputStreamReader(in), new OutputStreamWriter(out), null);        } catch (Exception e) {            error("Error during pipeline processing", e);        }    }