[cxml-cvs] CVS update: cxml/dom/dom-impl.lisp

David Lichteblau dlichteblau at common-lisp.net
Sun Dec 11 19:28:01 UTC 2005


Update of /project/cxml/cvsroot/cxml/dom
In directory common-lisp.net:/tmp/cvs-serv8594/dom

Modified Files:
	dom-impl.lisp 
Log Message:
importnode07 und namednodemapremovenameditemns02.xml geworkaroundet
*nichtueberzeugtsei*

Date: Sun Dec 11 20:28:00 2005
Author: dlichteblau

Index: cxml/dom/dom-impl.lisp
diff -u cxml/dom/dom-impl.lisp:1.23 cxml/dom/dom-impl.lisp:1.24
--- cxml/dom/dom-impl.lisp:1.23	Sun Dec 11 19:47:28 2005
+++ cxml/dom/dom-impl.lisp	Sun Dec 11 20:28:00 2005
@@ -1045,7 +1045,11 @@
 		       dtd))))
     (when e
       (dolist (a (cxml::elmdef-attributes e))
-        (when (and a (listp (cxml::attdef-default a)))
+        (when (and a
+		   (listp (cxml::attdef-default a))
+		   (not (dom:get-attribute-node
+			 element
+			 (cxml::attdef-name a))))
           (add-default-attribute element a))))))
 
 (defun add-default-attribute (element adef)
@@ -1055,6 +1059,15 @@
          (text (dom:create-text-node owner value)))
     (setf (slot-value anode 'specified-p) nil)
     (setf (slot-value anode 'owner-element) element)
+    (multiple-value-bind (prefix local-name)
+	(handler-case
+	    (cxml::split-qname (cxml::attdef-name adef))
+	  (cxml:well-formedness-violation (c)
+	    (dom-error :NAMESPACE_ERR "~A" c)))
+      ;; das ist fuer importnode07.
+      ;; so richtig ueberzeugend finde ich das ja nicht.
+      (setf (slot-value anode 'prefix) prefix)
+      (setf (slot-value anode 'local-name) local-name))
     (dom:append-child anode text)
     (push anode (slot-value (dom:attributes element) 'items))))
 
@@ -1292,6 +1305,7 @@
 	    (dom:set-attribute result
 			       (dom:name attribute)
 			       (dom:value attribute)))))
+    (add-default-attributes result)
     result))
 
 (defmethod dom:import-node ((document document) (node entity) deep)




More information about the Cxml-cvs mailing list