protected DocumentType createDoctype(EditDoctypeDialog dialog, Document document) { DocumentType result = null; if (document instanceof DocumentImpl) { IDOMDocument documentImpl = (IDOMDocument) document; IDOMDocumentType doctypeImpl = (IDOMDocumentType) documentImpl.createDoctype(dialog.getName()); doctypeImpl.setPublicId(dialog.getPublicId()); doctypeImpl.setSystemId(dialog.getSystemId()); result = doctypeImpl; } return result; }
protected void updateDoctype(EditDoctypeDialog dialog, DocumentType doctype) { if (doctype instanceof IDOMDocumentType) { IDOMDocumentType doctypeImpl = (IDOMDocumentType) doctype; if (doctypeImpl.getName().equals(dialog.getName())) { doctypeImpl.setPublicId(dialog.getPublicId()); doctypeImpl.setSystemId(dialog.getSystemId()); } else { // we need to create a new one and remove the old // Document document = doctype.getOwnerDocument(); DocumentType newDoctype = createDoctype(dialog, document); document.insertBefore(newDoctype, doctype); document.removeChild(doctype); // manager.reformat(newDoctype, false); } } } }
insertBreak(model, child); docType.setPublicId(publicId); if (entry != null) { String systemId = entry.getSystemId();