// Written by Jirka Kosek, jirka@kosek.cz // NO WARRANTY! This class is in the public domain. package cz.kosek; import java.io.*; import org.apache.crimson.parser.XMLReaderImpl; import com.arbortext.catalog.Catalog; import com.arbortext.catalog.CatalogEntityResolver; public class CatalogXMLReader extends XMLReaderImpl { static Catalog catalog = new Catalog(); static CatalogEntityResolver resolver = new CatalogEntityResolver(); public CatalogXMLReader() { try { catalog.loadSystemCatalogs(); resolver.setCatalog(catalog); } catch (IOException e) { System.err.println("Error loading catalogs: " + e.getMessage()); } this.setEntityResolver(resolver); } }