Commit a2bf3b17 authored by david's avatar david

Revision: cxml--devel--1.0--patch-85

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Mon Feb  9 12:09:03 CET 2004
Standard-date: 2004-02-09 11:09:03 GMT
Modified-files: xml/dom-impl.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-85
Summary: WRONG_DOCUMENT_ERR auch in set-attribute-node

WRONG_DOCUMENT_ERR auch in set-attribute-node
parent c01d9b87
......@@ -22,7 +22,8 @@
((parent :initarg :parent :initform nil)
(children :initarg :children :initform nil)
(owner :initarg :owner :initform nil)
(read-only-p :initform nil :reader read-only-p)))
(read-only-p :initform nil :reader read-only-p)
(map :initform nil)))
(defclass document (node)
((doc-type :initarg :doc-type :reader dom:doctype)
......@@ -37,8 +38,7 @@
(defclass attribute (node)
((name :initarg :name :reader dom:name)
(value :initarg :value :reader dom:value)
(specified-p :initarg :specified-p :reader dom:specified)
(map :initform nil)))
(specified-p :initarg :specified-p :reader dom:specified)))
(defmethod print-object ((object attribute) stream)
(print-unreadable-object (object stream :type t :identity t)
......@@ -587,6 +587,11 @@
(defmethod dom:set-attribute-node ((element element) (new-attr attribute))
(assert-writeable element)
(unless (eq (dom:owner-document element)
(dom:owner-document new-attr))
(dom-error :WRONG_DOCUMENT_ERR
"~S cannot adopt attribute node ~S, since it was created by a different document."
element new-attr))
(dom:set-named-item (dom:attributes element) new-attr))
(defmethod dom:get-attribute ((element element) name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment