Commit 0b2b75ec authored by david's avatar david

Revision: cxml--devel--1.0--patch-25

Creator: David Lichteblau <>
Date: Fri Jan 23 18:25:56 CET 2004
Standard-date: 2004-01-23 17:25:56 GMT
Modified-files: xml/dom-impl.lisp
Summary: dom:normalize implementiert
parent a897b418
......@@ -472,7 +472,23 @@
(error "Not implemented."))
(defmethod dom:normalize ((element element))
(error "Not implemented.") )
(labels ((walk (n)
(let ((previous nil))
(dolist (child (dom:child-nodes n))
((not (dom:text-node-p child))
(setf previous nil))
((and previous (dom:text-node-p previous))
(setf (slot-value previous 'data)
(concatenate 'vector
(dom:data previous)
(dom:data child)))
(dom:remove-child n child))
(setf previous child)))))
(mapc #'walk (dom:child-nodes n))))
(walk element))
;;; TEXT
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