src/main/java/org/jboss/util/xml/catalog/Catalog.java
public void parseAllCatalogs()
    throws MalformedURLException, IOException {

    // Parse all the subordinate catalogs
    for (int catPos = 0; catPos < catalogs.size(); catPos++) {
      Catalog c = null;

      try {
	c = (Catalog) catalogs.elementAt(catPos);
      } catch (ClassCastException e) {
	String catfile = (String) catalogs.elementAt(catPos);
	c = newCatalog();

	c.parseCatalog(catfile);
	catalogs.setElementAt(c, catPos);
	c.parseAllCatalogs();
      }
    }

    // Parse all the DELEGATE catalogs
    Enumeration enumt = catalogEntries.elements();
    while (enumt.hasMoreElements()) {
      CatalogEntry e = (CatalogEntry) enumt.nextElement();
      if (e.getEntryType() == DELEGATE_PUBLIC
	  || e.getEntryType() == DELEGATE_SYSTEM
	  || e.getEntryType() == DELEGATE_URI) {
	Catalog dcat = newCatalog();
	dcat.parseCatalog(e.getEntryArg(1));
      }
    }
  }
public void parseAllCatalogs()
    throws MalformedURLException, IOException {

    // Parse all the subordinate catalogs
    for (int catPos = 0; catPos < catalogs.size(); catPos++) {
      Catalog c = null;

      try {
	c = (Catalog) catalogs.elementAt(catPos);
      } catch (ClassCastException e) {
	String catfile = (String) catalogs.elementAt(catPos);
	c = newCatalog();

	c.parseCatalog(catfile);
	catalogs.setElementAt(c, catPos);
	c.parseAllCatalogs();
      }
    }

    // Parse all the DELEGATE catalogs
    Enumeration enumt = catalogEntries.elements();
    while (enumt.hasMoreElements()) {
      CatalogEntry e = (CatalogEntry) enumt.nextElement();
      if (e.getEntryType() == DELEGATE_PUBLIC
	  || e.getEntryType() == DELEGATE_SYSTEM
	  || e.getEntryType() == DELEGATE_URI) {
	Catalog dcat = newCatalog();
	dcat.parseCatalog(e.getEntryArg(1));
      }
    }
  }
Parse all subordinate catalogs.

<p>This method recursively parses all of the subordinate catalogs.
If this method does not throw an exception, you can be confident that
no subsequent call to any resolve*() method will either, with two
possible exceptions:</p>

<ol>
<li><p>Delegated catalogs are re-parsed each time they are needed
(because a variable list of them may be needed in each case,
depending on the length of the matching partial public identifier).</p>
<p>But they are parsed by this method, so as long as they don't
change or disappear while the program is running, they shouldn't
generate errors later if they don't generate errors now.</p>
<li><p>If you add new catalogs with <code>parseCatalog</code>, they
won't be loaded until they are needed or until you call
<code>parseAllCatalogs</code> again.</p>
</ol>

<p>On the other hand, if you don't call this method, you may
successfully parse documents without having to load all possible
catalogs.</p>

@throws MalformedURLException The filename (URL) for a
subordinate or delegated catalog is not a valid URL.
@throws IOException Error reading some subordinate or delegated
catalog file.