fix importing attributes to -really- copy all their slots

This commit is contained in:
dlichteblau
2006-08-28 09:04:51 +00:00
parent 86e32cbf75
commit 8f5dec364c

View File

@ -1349,6 +1349,7 @@
(import-node-internal 'attribute (import-node-internal 'attribute
document node document node
t t
:specified-p (dom:specified node)
:name (dom:name node) :name (dom:name node)
:namespace-uri (dom:namespace-uri node) :namespace-uri (dom:namespace-uri node)
:local-name (dom:local-name node) :local-name (dom:local-name node)
@ -1371,14 +1372,10 @@
(setf (slot-value attributes 'element) result) (setf (slot-value attributes 'element) result)
(dolist (attribute (dom:items (dom:attributes node))) (dolist (attribute (dom:items (dom:attributes node)))
(when (or (dom:specified attribute) *clone-not-import*) (when (or (dom:specified attribute) *clone-not-import*)
(let ((attr (dom:import-node document attribute t)))
(if (dom:namespace-uri attribute) (if (dom:namespace-uri attribute)
(dom:set-attribute-ns result (dom:set-attribute-node-ns result attr)
(dom:namespace-uri attribute) (dom:set-attribute-node result attr)))))
(dom:local-name attribute)
(dom:value attribute))
(dom:set-attribute result
(dom:name attribute)
(dom:value attribute)))))
(add-default-attributes result) (add-default-attributes result)
result)) result))