[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: Refactoring xml.el namespace handling

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> (with-temp-buffer
>   (insert "<rdf:RDF>\n</rdf:RDF>\n")
>   (goto-char (point-min))
>   (xml-parse-tag))

For me this gives: (rdf:RDF nil "\n") which, I suppose, means that I
need to try to get some more patches committed.

In any case, here is a patch against current CVS that fixes the

2004-04-16  Mark A. Hershberger  <mah@everybody.org>

	* xml.el (xml-parse-tag): Avoid overwriting node-name.

--- xml.el.~1.31.~	2004-04-16 14:56:46.000000000 -0500
+++ xml.el	2004-04-16 15:01:22.000000000 -0500
@@ -325,10 +325,8 @@
 	      (push (cons (cdar attr) (intern (concat ":" (cdr attr))))
-        ;; expand element names
-        (setq node-name (list (xml-maybe-do-ns node-name "" xml-ns)))
+        (setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns)))
-        (setq children (list attrs node-name))
 	;; is this an empty element ?
 	(if (looking-at "/>")

A choice between one man and a shovel, or a dozen men with teaspoons
is clear to me, and I'm sure it is clear to you also.
    -- Zimran Ahmed <http://www.winterspeak.com/>