return new InputSource(new FileInputStream(m_dtd));
InputStream dtdStream = null; if (m_dtd.exists()) { dtdStream = new FileInputStream(m_dtd); } else { LOG.warn("Cannot find " + m_dtd);  dtdStream = getClass().getClassLoader().getResourceAsStream(DTD);  } if (dtdStream != null) { return new InputSource(dtdStream); }  return new InputSource(systemId);
        public InputSource resolveEntity(String publicId, String systemId) throws IOException {            if (publicId != null) {                if (publicId.startsWith("-//SIPFoundry//sipXconfig//Model specification ")) {                    return new InputSource(new FileInputStream(m_dtd));                }            } else if (systemId != null && m_baseSystemId != null) {                // LIMITATION: All files loaded as ENTITYies defined as SYSTEM                // must live in same directory as XML file                //                // HACK: Xerces 2.7.0 has a propensity to expand systemId to full path                // which makes it impossible to determine original relative URI. Tricks to use                 // systemId on inputsource and using file:// failed.                 String name = new File(systemId).getName();                File f = new File(m_baseSystemId, name);                return new InputSource(new FileInputStream(f));                                }                            return null;        }