m_attrSets = new Hashtable();
m_attrSets = new HashMap();
  public void recompose() throws TransformerException  {    // Now we make a Vector that is going to hold all of the recomposable elements      Vector recomposableElements = new Vector();    // First, we build the global import tree.    if (null == m_globalImportList)    {      Vector importList = new Vector();      addImports(this, true, importList);                  // Now we create an array and reverse the order of the importList vector.      // We built the importList vector backwards so that we could use addElement      // to append to the end of the vector instead of constantly pushing new      // stylesheets onto the front of the vector and having to shift the rest      // of the vector each time.      m_globalImportList = new StylesheetComposed[importList.size()];      for (int i =  0, j= importList.size() -1; i < importList.size(); i++)      {          m_globalImportList[j] = (StylesheetComposed) importList.elementAt(i);        // Build the global include list for this stylesheet.        // This needs to be done ahead of the recomposeImports        // because we need the info from the composed includes.         m_globalImportList[j].recomposeIncludes(m_globalImportList[j]);        // Calculate the number of this import.            m_globalImportList[j--].recomposeImports();              }    }        // Next, we walk the import tree and add all of the recomposable elements to the vector.    int n = getGlobalImportCount();    for (int i = 0; i < n; i++)    {      StylesheetComposed imported = getGlobalImport(i);      imported.recompose(recomposableElements);    }    // We sort the elements into ascending order.    QuickSort2(recomposableElements, 0, recomposableElements.size() - 1);    // We set up the global variables that will hold the recomposed information.    m_outputProperties = new OutputProperties(org.apache.xml.serializer.Method.UNKNOWN);//  m_outputProperties = new OutputProperties(Method.XML);        m_attrSets = new Hashtable();    m_decimalFormatSymbols = new Hashtable();    m_keyDecls = new Vector();    m_namespaceAliasComposed = new Hashtable();    m_templateList = new TemplateList();    m_variables = new Vector();    // Now we sequence through the sorted elements,     // calling the recompose() function on each one.  This will call back into the    // appropriate routine here to actually do the recomposition.    // Note that we're going backwards, encountering the highest precedence items first.    for (int i = recomposableElements.size() - 1; i >= 0; i--)      ((ElemTemplateElement) recomposableElements.elementAt(i)).recompose(this);    /* * Backing out REE again, as it seems to cause some new failures * which need to be investigated. -is */          // This has to be done before the initialization of the compose state, because     // eleminateRedundentGlobals will add variables to the m_variables vector, which     // it then copied in the ComposeState constructor.    //    if(true && org.apache.xalan.processor.TransformerFactoryImpl.m_optimize)//    {//          RedundentExprEliminator ree = new RedundentExprEliminator();//          callVisitors(ree);//          ree.eleminateRedundentGlobals(this);//    }              initComposeState();    // Need final composition of TemplateList.  This adds the wild cards onto the chains.    m_templateList.compose(this);        // Need to clear check for properties at the same import level.    m_outputProperties.compose(this);    m_outputProperties.endCompose(this);        // Now call the compose() method on every element to give it a chance to adjust    // based on composed values.        n = getGlobalImportCount();    for (int i = 0; i < n; i++)    {      StylesheetComposed imported = this.getGlobalImport(i);      int includedCount = imported.getIncludeCountComposed();      for (int j = -1; j < includedCount; j++)      {        Stylesheet included = imported.getIncludeComposed(j);        composeTemplates(included);      }    }    // Attempt to register any remaining unregistered extension namespaces.    if (m_extNsMgr != null)      m_extNsMgr.registerUnregisteredNamespaces();    clearComposeState();  }