/** * Test verifies correct identification of the internal DTD subset and * correct non-presence of the external DTD subset. * * @throws Exception * DOCUMENT ME! */ public void testInternalDTDSubset() throws Exception { /* * Setup the expected DocumentType. * * @todo dom4j should expose a DefaultDocumentType constructor that * accepts only the elementName property. This is used when only an * internal DTD subset is being provided via the <!DOCTYPE foo [...]> * syntax, in which case there is neither a SYSTEM nor PUBLIC * identifier. */ DocumentType expected = new DefaultDocumentType(); expected.setElementName("greeting"); expected.setInternalDeclarations(getInternalDeclarations()); /* * Parse the test XML document and compare the expected and actual * DOCTYPEs. */ assertSameDocumentType(expected, readDocument(XML_INTERNAL_FILE, true, false).getDocType()); }