src/main/java/org/jboss/util/xml/catalog/Catalog.java
protected void addDelegate(CatalogEntry entry) {
    int pos = 0;
    String partial = entry.getEntryArg(0);

    Enumeration local = localDelegate.elements();
    while (local.hasMoreElements()) {
      CatalogEntry dpe = (CatalogEntry) local.nextElement();
      String dp = dpe.getEntryArg(0);
      if (dp.equals(partial)) {
	// we already have this prefix
	return;
      }
      if (dp.length() > partial.length()) {
	pos++;
      }
      if (dp.length() < partial.length()) {
	break;
      }
    }

    // now insert partial into the vector at [pos]
    if (localDelegate.size() == 0) {
      localDelegate.addElement(entry);
    } else {
      localDelegate.insertElementAt(entry, pos);
    }
  }
protected void addDelegate(CatalogEntry entry) {
    int pos = 0;
    String partial = entry.getEntryArg(0);

    Enumeration local = localDelegate.elements();
    while (local.hasMoreElements()) {
      CatalogEntry dpe = (CatalogEntry) local.nextElement();
      String dp = dpe.getEntryArg(0);
      if (dp.equals(partial)) {
	// we already have this prefix
	return;
      }
      if (dp.length() > partial.length()) {
	pos++;
      }
      if (dp.length() < partial.length()) {
	break;
      }
    }

    // now insert partial into the vector at [pos]
    if (localDelegate.size() == 0) {
      localDelegate.addElement(entry);
    } else {
      localDelegate.insertElementAt(entry, pos);
    }
  }
Add to the current list of delegated catalogs.

<p>This method always constructs the {@link #localDelegate}
vector so that it is ordered by length of partial
public identifier.</p>

@param entry The DELEGATE catalog entry