From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Problems with xml-parse-string Date: Wed, 22 Sep 2010 11:46:11 -0400 Message-ID: <87bp7pkcho.fsf@stupidchicken.com> References: <87pqw6d7nz.fsf@stupidchicken.com> <87zkvaiked.fsf@stupidchicken.com> <87vd5ymptn.fsf@stupidchicken.com> <87zkv97u1k.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285170405 6148 80.91.229.12 (22 Sep 2010 15:46:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2010 15:46:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 22 17:46:43 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OyRWo-0000G5-3k for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2010 17:46:38 +0200 Original-Received: from localhost ([127.0.0.1]:45135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyRWn-0004dr-Cu for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2010 11:46:37 -0400 Original-Received: from [140.186.70.92] (port=53543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyRWT-0004WS-Dz for emacs-devel@gnu.org; Wed, 22 Sep 2010 11:46:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyRWO-00086n-Hj for emacs-devel@gnu.org; Wed, 22 Sep 2010 11:46:17 -0400 Original-Received: from pantheon-po26.its.yale.edu ([130.132.50.121]:48289) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyRWO-00086g-Er for emacs-devel@gnu.org; Wed, 22 Sep 2010 11:46:12 -0400 Original-Received: from furry (dhcp128036014154.central.yale.edu [128.36.14.154]) (authenticated bits=0) by pantheon-po26.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o8MFkBAT030750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 22 Sep 2010 11:46:11 -0400 Original-Received: by furry (Postfix, from userid 1000) id 5D95C16D402; Wed, 22 Sep 2010 11:46:11 -0400 (EDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 22 Sep 2010 16:32:31 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130629 Archived-At: Lars Magne Ingebrigtsen writes: > Chong Yidong writes: > >> So either the new libxml functions have to provide the same format as >> xml.el, or xml.el has to be changed to used the new format, breaking >> existing uses. I am amenable to the latter if the new format is so much >> better than the old one that it's worth dealing with the backward >> compatibility headaches. > > I'd volunteer for changing the callers to use the new format if you > change xml.el to do the same. First let me clarify a technical detail. In your new format, (catalog (text . "\n ") (book (:type . "manual") (text . "\n ") (title (text . "GNU Emacs manual")) (text . "\n ")) (text . "\n")) seems to assume that element names never start with the colon character. That is, there can never be an element named ":type". The XML spec (http://www.w3.org/TR/2008/REC-xml-20081126/) seems to indicate that element names are allowed to start with a colon; see the definition of NameStartChar in section 2.3. It looks like the new format would give ambiguous results in that case.