@Test public void should_resolve_dtd_full_path_from_xml_file() throws Exception { DtdResolver dtdResolver = new DtdResolver(); String dtdFile = dtdResolver.resolveDtdLocationFullPath("datasets/xml/users-with-dtd.xml"); assertThat(dtdFile).isEqualTo("datasets/xml/users.dtd"); }
public String resolveDtdLocationFullPath(final String xml) { final String dtd = resolveDtdLocation(xml); if (dtd == null) { return null; } final String path = xml.substring(0, xml.lastIndexOf('/')); return path + '/' + dtd; }
DtdResolver { public String resolveDtdLocationFullPath(final String xml) { final String dtd = resolveDtdLocation(xml); if (dtd == null) { return null; } final String path = xml.substring(0, xml.lastIndexOf('/')); return path + '/' + dtd; } }
DtdResolver { public String resolveDtdLocationFullPath(final String xml) { final String dtd = resolveDtdLocation(xml); if (dtd == null) { return null; } final String path = xml.substring(0, xml.lastIndexOf('/')); return path + '/' + dtd; }  }
DtdResolver { public String resolveDtdLocationFullPath(final String xml) { final String dtd = resolveDtdLocation(xml); if (dtd == null) { return null; } final String path = xml.substring(0, xml.lastIndexOf('/')); return path + '/' + dtd; }  String resolveDtdLocation(final String xmlFile); String resolveDtdLocationFullPath(final String xml); }
DtdResolver { public String resolveDtdLocationFullPath(final String xml) { final String dtd = resolveDtdLocation(xml); if (dtd == null) { return null; } final String path = xml.substring(0, xml.lastIndexOf('/')); return path + '/' + dtd; }  String resolveDtdLocation(final String xmlFile); String resolveDtdLocationFullPath(final String xml);  }