code: public int getImportNumber(StylesheetComposed sheet)
    {
  
      if (this == sheet)
        return 0;
  
      int n = getGlobalImportCount();
  
      for (int i = 0; i < n; i++)
      {
        if (sheet == getGlobalImport(i))
          return i;
      }
  
      return -1;
    }
docs: Given a stylesheet, return the number of the stylesheet
  in the global import list.
  @param sheet The stylesheet which will be located in the
  global import list.
  @return The index into the global import list of the given stylesheet,
  or -1 if it is not found (which should never happen).