private static IDocument createDocumentWithDTD(
     final DocumentType documentType, final String rootElementName) {
   final IDocument result = new Document(new QualifiedName(null, rootElementName));
   result.setPublicID(documentType.getPublicId());
   result.setSystemID(documentType.getSystemId());
   return result;
 }
  @Test
  public void testPluginDoctypeDefinition() throws Exception {
    final ConfigurationRegistry configurationRegistry =
        new ConfigurationRegistryImpl(new ConfigLoaderJob());
    configurationRegistry.loadConfigurations();

    final DocumentType doctype =
        configurationRegistry.getDocumentType("-//Vex//DTD Test//EN", null);
    assertNotNull(doctype);
    assertEquals("test.dtd", doctype.getSystemId());
  }
 private static boolean isDTD(final DocumentType documentType) {
   final String systemId = documentType.getSystemId();
   return systemId != null && systemId.toLowerCase().endsWith(".dtd");
 }