try { javax.xml.parsers.SAXParserFactory factory= javax.xml.parsers.SAXParserFactory.newInstance(); factory.setNamespaceAware( true ); javax.xml.parsers.SAXParser jaxpParser= factory.newSAXParser(); reader=jaxpParser.getXMLReader();  } catch( javax.xml.parsers.ParserConfigurationException ex ) { throw new org.xml.sax.SAXException( ex ); } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) { throw new org.xml.sax.SAXException( ex1.toString() ); } catch( NoSuchMethodError ex2 ) { }
  protected void parse(          StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)            throws org.xml.sax.SAXException  {    TransformerFactoryImpl processor = handler.getStylesheetProcessor();    URIResolver uriresolver = processor.getURIResolver();    try    {      Source source = null;      if (null != uriresolver)      {        source = uriresolver.resolve(getHref(),                                     handler.getBaseIdentifier());        if (null != source && source instanceof DOMSource)        {          Node node = ((DOMSource)source).getNode();          TreeWalker walker = new TreeWalker(handler);          try          {            walker.traverse(node);          }          catch(org.xml.sax.SAXException se)          {            throw new TransformerException(se);          }          return;        }      }            if(null == source)      {        String absURL = SystemIDResolver.getAbsoluteURI(getHref(),                          handler.getBaseIdentifier());        source = new StreamSource(absURL);      }            XMLReader reader = null;            if(source instanceof SAXSource)      {        SAXSource saxSource = (SAXSource)source;        reader = saxSource.getXMLReader(); // may be null      }            InputSource inputSource = SAXSource.sourceToInputSource(source);      if (null == reader)        reader = XMLReaderFactory.createXMLReader();      if (null != reader)      {        reader.setContentHandler(handler);        try        {          reader.setFeature("http://apache.org/xml/features/validation/dynamic",                            true);        }        catch(org.xml.sax.SAXException se) {}                handler.pushBaseIndentifier(inputSource.getSystemId());        try        {          reader.parse(inputSource);        }        finally        {          handler.popBaseIndentifier();        }      }    }    catch (IOException ioe)    {      handler.error(XSLTErrorResources.ER_IOEXCEPTION,                    new Object[]{ getHref() }, ioe);    }    catch(TransformerException te)    {      handler.error(te.getMessage(), te);    }  }