public static void main(String[] args) throws Exception {
PropertyConfigurator.disableAll();
PropertyConfigurator.configure("x.lcf");
// I. Instantiate a stylesheet processor.
Processor processor = Processor.newInstance("xslt");
// II. Process the stylesheet. producing a Templates object.
// Get the XMLReader.
XMLReader reader = XMLReaderFactory.createXMLReader();
// Set the ContentHandler.
TemplatesBuilder templatesBuilder = processor.getTemplatesBuilder();
reader.setContentHandler(templatesBuilder);
// Set the ContentHandler to also function as a LexicalHandler, which
// includes "lexical" (e.g., comments and CDATA) events. The Xalan
// TemplatesBuilder -- org.apache.xalan.processor.StylesheetHandler -- is