Index: Document.java =================================================================== RCS file: /home/cvspublic/jdom/src/java/org/jdom/Document.java,v retrieving revision 1.45 diff -c -r1.45 Document.java *** Document.java 2001/10/07 19:07:52 1.45 --- Document.java 2001/11/25 01:47:07 *************** *** 267,272 **** --- 267,276 ---- docType.setDocument(this); } + if (this.docType != null) { + this.docType.setDocument(null); + } + this.docType = docType; return this; }