public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
public void endDTD() throws SAXException { insideDTDSection = false; DocumentType docType = getDocument().getDocType(); if (docType != null) { if (internalDTDDeclarations != null) { docType.setInternalDeclarations(internalDTDDeclarations); } if (externalDTDDeclarations != null) { docType.setExternalDeclarations(externalDTDDeclarations); } } internalDTDDeclarations = null; externalDTDDeclarations = null; }
/** * Test verifies correct identification of the internal and external DTD * subsets. */ public void testMixedDTDSubset() throws Exception { /* * Setup the expected DocumentType. */ DocumentType expected = new DefaultDocumentType("another-greeting", null, DTD_SYSTEM_ID); expected.setInternalDeclarations(getInternalDeclarations()); expected.setExternalDeclarations(getExternalDeclarations()); /* * Parse the test XML document and compare the expected and actual * DOCTYPEs. */ assertSameDocumentType(expected, readDocument(XML_MIXED, true, true).getDocType()); }
/** * 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()); }