Commit 7d78f8da authored by david's avatar david

Revision: cxml--devel--1.0--patch-69

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Fri Feb  6 18:39:23 CET 2004
Standard-date: 2004-02-06 17:39:23 GMT
Modified-files: xml/dom-impl.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-69
Summary: INUSE_ATTRIBUTE_ERR

INUSE_ATTRIBUTE_ERR
parent 08922aba
......@@ -37,7 +37,8 @@
(defclass attribute (node)
((name :initarg :name :reader dom:name)
(value :initarg :value :reader dom:value)
(specified-p :initarg :specified-p :reader dom:specified)))
(specified-p :initarg :specified-p :reader dom:specified)
(element :initform nil)))
(defmethod print-object ((object attribute) stream)
(print-unreadable-object (object stream :type t :identity t)
......@@ -548,6 +549,11 @@
(defmethod dom:set-attribute-node ((element element) (new-attr attribute))
(assert-writeable element)
(let ((old-element (slot-value new-attr 'element)))
(when (and old-element (not (eq old-element element)))
(dom-error :INUSE_ATTRIBUTE_ERR "Attribute node already has an element"
new-attr)))
(setf (slot-value new-attr 'element) element)
(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