From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: mah@everybody.org (Mark A. Hershberger) Newsgroups: gmane.emacs.devel,gmane.emacs.w3m Subject: Re: Refactoring xml.el namespace handling Date: Fri, 16 Apr 2004 15:05:40 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87vfjzvgbv.fsf@weblog.localhost> References: <87d67r2k2a.fsf@weblog.localhost> <87r7uqbe5d.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082146292 10332 80.91.224.253 (16 Apr 2004 20:11:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Apr 2004 20:11:32 +0000 (UTC) Cc: emacs-w3m@namazu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 16 22:11:18 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BEZgE-0002X2-00 for ; Fri, 16 Apr 2004 22:11:18 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BEZgE-0002la-00 for ; Fri, 16 Apr 2004 22:11:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BEZez-00005O-PH for emacs-devel@quimby.gnus.org; Fri, 16 Apr 2004 16:10:01 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BEZdT-0007kp-Qn for emacs-devel@gnu.org; Fri, 16 Apr 2004 16:08:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BEZcM-0006sb-6Q for emacs-devel@gnu.org; Fri, 16 Apr 2004 16:07:49 -0400 Original-Received: from [64.124.179.97] (helo=superman.everybody.org) by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1BEZas-0005uV-2Y for emacs-devel@gnu.org; Fri, 16 Apr 2004 16:05:46 -0400 Original-Received: from [66.76.202.249] (helo=weblog.localhost) by superman.everybody.org with asmtp (Exim 4.30) id 1BEZd4-0004Qn-Lk; Fri, 16 Apr 2004 15:08:02 -0500 Original-To: Katsumi Yamaoka X-URL: http://mah.everybody.org/weblog/ In-Reply-To: (Katsumi Yamaoka's message of "Fri, 16 Apr 2004 12:14:38 +0900") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.0 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21795 gmane.emacs.w3m:4035 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21795 Katsumi Yamaoka writes: > (with-temp-buffer > (insert "\n\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 * 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