Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 823 → Rev 824

/sun/xmleditor/trunk/src/control/DocumentManager.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.122 $
* @version $Revision: 1.123 $
*
* Last modification: $Date: 2003/07/25 13:50:56 $
* $Id: DocumentManager.java,v 1.122 2003/07/25 13:50:56 hjokusch Exp $
* Last modification: $Date: 2003/07/25 17:14:31 $
* $Id: DocumentManager.java,v 1.123 2003/07/25 17:14:31 hjokusch Exp $
*/
 
package src.control;
50,7 → 50,7
*
* @author Group 5
*
* @version $Revision: 1.122 $ Last modification: $Date: 2003/07/25 13:50:56 $
* @version $Revision: 1.123 $ Last modification: $Date: 2003/07/25 17:14:31 $
*/
public class DocumentManager implements ActionListener,DocumentManagerInterface,ChangeListener {
 
852,13 → 852,17
}
 
/**
* <code>setNewDTD</code> lets the user choose a DTD file and launches a method in the
* current <code>OurDocument</code> instance that changes it's DTD grammar file entry
* to the chosen file.
* <code>setNewDTD</code> lets the user change the current document's DOCTYPE entry.
*
* A user may choose a DTD file. If an XML document has been opened, a DOCTYPE entry
* will be inserted into the header of the current document. If a DOCTYPE entry
* already exists, it will be overwritten. Please note that this method will only add
* a name and a SYSTEM identifier to the DOCTYPE entry, a PUBLIC identifier must be
* added manually from inside the text editor.
*
* author S. McSporran
*
* Last revision: 11-Jul-2003
* Last revision: 26-Jul-2003
*/
public void setNewDTD() {
887,10 → 891,16
 
/* If a document exists, proceed. */
if (! openDocumentList.isEmpty()) {
actualDocument.changeDTDGrammar(actualDocument.getDomDoc(), dtdFile);
updateView.update();
/* Check, if a DTD file has been chosen. */
if (dtdFile != null) {
actualDocument.changeDTDGrammar(actualDocument.getDomDoc(), dtdFile);
updateView.update();
} else {
log(LogInterface.TYPE_ERROR, "No file selected !");
}
} else {
log(LogInterface.TYPE_WARNING, "No document available !");
log(LogInterface.TYPE_ERROR, "No document available !");
}
}
}
900,8 → 910,7
}
public void setNoSchema(){
File x = null;
actualDocument.changeSchemaGrammar(actualDocument.getDomDoc(),x);
actualDocument.changeSchemaGrammar(actualDocument.getDomDoc(), null);
}
 
/**