public void startElement(
          StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
            throws org.xml.sax.SAXException
  {


    setPropertiesFromAttributes(handler, rawName, attributes, this);

    try
    {

      // Get the Source from the user's URIResolver (if any).
      Source sourceFromURIResolver = getSourceFromUriResolver(handler);
      // Get the system ID of the included/imported stylesheet module
      String hrefUrl = getBaseURIOfIncludedStylesheet(handler, sourceFromURIResolver);

      if (handler.importStackContains(hrefUrl))
      {
        throw new org.xml.sax.SAXException(
          XSLMessages.createMessage(
          getStylesheetInclErr(), new Object[]{ hrefUrl }));  //"(StylesheetHandler) "+hrefUrl+" is directly or indirectly importing itself!");
      }

      // Push the system ID and corresponding Source
      // on some stacks for later retrieval during parse() time.
      handler.pushImportURL(hrefUrl);
      handler.pushImportSource(sourceFromURIResolver);

      int savedStylesheetType = handler.getStylesheetType();

      handler.setStylesheetType(this.getStylesheetType());
      handler.pushNewNamespaceSupport();

      try
      {
        parse(handler, uri, localName, rawName, attributes);
      }
      finally
      {
        handler.setStylesheetType(savedStylesheetType);
        handler.popImportURL();
        handler.popImportSource();
        handler.popNamespaceSupport();
      }
    }
    catch(TransformerException te)
    {
      handler.error(te.getMessage(), te);
    }
  }
public void startElement ( StylesheetHandler handler , String uri , String localName , String rawName , Attributes attributes ) throws org . xml . sax . SAXException { setPropertiesFromAttributes ( handler , rawName , attributes , this ) ; try { Source sourceFromURIResolver = getSourceFromUriResolver ( handler ) ; String hrefUrl = getBaseURIOfIncludedStylesheet ( handler , sourceFromURIResolver ) ; if ( handler . importStackContains ( hrefUrl ) ) { throw new org . xml . sax . SAXException ( XSLMessages . createMessage ( getStylesheetInclErr ( ) , new Object [ ] { hrefUrl } ) ) ; } handler . pushImportURL ( hrefUrl ) ; handler . pushImportSource ( sourceFromURIResolver ) ; int savedStylesheetType = handler . getStylesheetType ( ) ; handler . setStylesheetType ( this . getStylesheetType ( ) ) ; handler . pushNewNamespaceSupport ( ) ; try { parse ( handler , uri , localName , rawName , attributes ) ; } finally { handler . setStylesheetType ( savedStylesheetType ) ; handler . popImportURL ( ) ; handler . popImportSource ( ) ; handler . popNamespaceSupport ( ) ; } } catch ( TransformerException te ) { handler . error ( te . getMessage ( ) , te ) ; } }
Receive notification of the start of an xsl:include element.

@param handler The calling StylesheetHandler/TemplatesBuilder.
@param uri The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.
@param localName The local name (without prefix), or the
empty string if Namespace processing is not being
performed.
@param rawName The raw XML 1.0 name (with prefix), or the
empty string if raw names are not available.
@param attributes The attributes attached to the element.  If
there are no attributes, it shall be an empty
Attributes object.

@throws org.xml.sax.SAXException Any SAX exception, possibly
wrapping another exception.