From 3dce1bffe5ae406060d26ccd708b58d9b8bee210 Mon Sep 17 00:00:00 2001 From: dlichteblau Date: Sun, 4 Dec 2005 22:25:34 +0000 Subject: [PATCH] MORE WRONG_DOCUMENT_ERR --- DOMTEST | 4 +--- dom/dom-impl.lisp | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DOMTEST b/DOMTEST index f9a9c67..f94f17e 100644 --- a/DOMTEST +++ b/DOMTEST @@ -565,9 +565,7 @@ implementationAttribute signed not supported, skipping test 535/808 createDocument01.xml 536/808 createDocument02.xml 537/808 createDocument03.xml -TEST FAILED: expected exception WRONG_DOCUMENT_ERR 538/808 createDocument04.xml -TEST FAILED: expected exception WRONG_DOCUMENT_ERR 539/808 createDocument05.xml 540/808 createDocument06.xml 541/808 createDocument07.xml @@ -932,4 +930,4 @@ TEST FAILED: expected exception INUSE_ATTRIBUTE_ERR 803/808 setNamedItemNS04.xml 804/808 setNamedItemNS05.xml 805/808 systemId01.xml -45/763 tests failed; 45 tests were skipped \ No newline at end of file +43/763 tests failed; 45 tests were skipped \ No newline at end of file diff --git a/dom/dom-impl.lisp b/dom/dom-impl.lisp index 74d28b9..ca96ba8 100644 --- a/dom/dom-impl.lisp +++ b/dom/dom-impl.lisp @@ -239,6 +239,8 @@ (unless (typep doctype 'document-type) (dom-error :WRONG_DOCUMENT_ERR "doctype was created by a different dom implementation")) + (when (dom:owner-document doctype) + (dom-error :WRONG_DOCUMENT_ERR "doctype already in use")) (setf (slot-value doctype 'dom-impl::owner) document (slot-value (dom:notations doctype) 'dom-impl::owner) document (slot-value (dom:entities doctype) 'dom-impl::owner) document))