[cxml-cvs] CVS cxml/dom

dlichteblau dlichteblau at common-lisp.net
Mon Aug 28 09:04:52 UTC 2006


Update of /project/cxml/cvsroot/cxml/dom
In directory clnet:/tmp/cvs-serv7505/dom

Modified Files:
	dom-impl.lisp 
Log Message:
fix importing attributes to -really- copy all their slots   


--- /project/cxml/cvsroot/cxml/dom/dom-impl.lisp	2006/08/27 17:29:39	1.40
+++ /project/cxml/cvsroot/cxml/dom/dom-impl.lisp	2006/08/28 09:04:51	1.41
@@ -1349,6 +1349,7 @@
   (import-node-internal 'attribute
 			document node
 			t
+                        :specified-p (dom:specified node)
 			:name (dom:name node)
 			:namespace-uri (dom:namespace-uri node)
 			:local-name (dom:local-name node)
@@ -1371,14 +1372,10 @@
     (setf (slot-value attributes 'element) result)
     (dolist (attribute (dom:items (dom:attributes node)))
       (when (or (dom:specified attribute) *clone-not-import*)
-        (if (dom:namespace-uri attribute)
-	    (dom:set-attribute-ns result
-				  (dom:namespace-uri attribute)
-				  (dom:local-name attribute)
-				  (dom:value attribute))
-	    (dom:set-attribute result
-			       (dom:name attribute)
-			       (dom:value attribute)))))
+        (let ((attr (dom:import-node document attribute t)))
+          (if (dom:namespace-uri attribute)
+              (dom:set-attribute-node-ns result attr)
+              (dom:set-attribute-node result attr)))))
     (add-default-attributes result)
     result))
 




More information about the Cxml-cvs mailing list