[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Refactoring xml.el namespace handling
- From: mah@xxxxxxxxxxxxx (Mark A. Hershberger)
- Date: Fri, 16 Apr 2004 15:05:40 -0500
- X-ml-name: emacs-w3m
- X-mail-count: 06659
- References: <87d67r2k2a.fsf@weblog.localhost><87r7uqbe5d.fsf-monnier+emacs@gnu.org> <b9ysmf4sjfl.fsf@jpl.org>
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
problem:
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))))
xml-ns))))
- ;; 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 "/>")
(progn
--
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/>