return decl;
return null;
  private ElemExtensionDecl getElemExtensionDecl(StylesheetRoot stylesheet,          String namespace)  {    ElemExtensionDecl decl = null;    int n = stylesheet.getGlobalImportCount();    for (int i = 0; i < n; i++)    {      Stylesheet imported = stylesheet.getGlobalImport(i);      for (ElemTemplateElement child = imported.getFirstChildElem();              child != null; child = child.getNextSiblingElem())      {        if (Constants.ELEMNAME_EXTENSIONDECL == child.getXSLToken())        {          decl = (ElemExtensionDecl) child;          String prefix = decl.getPrefix();          String declNamespace = child.getNamespaceForPrefix(prefix);          if (namespace.equals(declNamespace))          {            return decl;          }        }      }    }    return decl;  }