Commit 3e071578 authored by david's avatar david

Revision: cxml--devel--1.0--patch-26

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Mon Feb  2 15:39:18 CET 2004
Standard-date: 2004-02-02 14:39:18 GMT
Modified-files: xml/dom-impl.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-26
Summary: get-elements-by-tag-name fuer Element implementiert

get-elements-by-tag-name fuer Element implementiert
parent 0b2b75ec
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
:name name :name name
:owner document)) :owner document))
(defmethod dom:get-elements-by-tag-name ((document document) tag-name) (defmethod get-elements-by-tag-name-internal (node tag-name)
(setf tag-name (rod tag-name)) (setf tag-name (rod tag-name))
(let ((result nil)) (let ((result nil))
(setf tag-name (rod tag-name)) (setf tag-name (rod tag-name))
...@@ -149,9 +149,12 @@ ...@@ -149,9 +149,12 @@
(or wild-p (rod= tag-name (dom:node-name n)))) (or wild-p (rod= tag-name (dom:node-name n))))
(push n result)) (push n result))
(mapc #'walk (dom:child-nodes n)))) (mapc #'walk (dom:child-nodes n))))
(walk document) (walk node)
(reverse result))))) (reverse result)))))
(defmethod dom:get-elements-by-tag-name ((document document) tag-name)
(get-elements-by-tag-name-internal document tag-name))
;;; Node ;;; Node
(defmethod dom:parent-node ((node node)) (defmethod dom:parent-node ((node node))
...@@ -468,8 +471,7 @@ ...@@ -468,8 +471,7 @@
(error "Attribute not found.")))) (error "Attribute not found."))))
(defmethod dom:get-elements-by-tag-name ((element element) name) (defmethod dom:get-elements-by-tag-name ((element element) name)
name (get-elements-by-tag-name-internal element name))
(error "Not implemented."))
(defmethod dom:normalize ((element element)) (defmethod dom:normalize ((element element))
(labels ((walk (n) (labels ((walk (n)
......
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