code: public void compose(StylesheetRoot sroot) throws TransformerException
    {
      // See if we can reduce an RTF to a select with a string expression.
      if(null == m_selectPattern  
         && sroot.getOptimizer())
      {
        XPath newSelect = ElemVariable.rewriteChildToExpression(this);
        if(null != newSelect)
          m_selectPattern = newSelect;
      }
      m_qnameID = sroot.getComposeState().getQNameID(m_qname);
      super.compose(sroot);
      
      java.util.Vector vnames = sroot.getComposeState().getVariableNames();
      if(null != m_selectPattern)
        m_selectPattern.fixupVariables(vnames, sroot.getComposeState().getGlobalsSize());
        
      // m_index must be resolved by ElemApplyTemplates and ElemCallTemplate!
    }
docs: This function is called after everything else has been
  recomposed, and allows the template to set remaining
  values that may be based on some other property that
  depends on recomposition.