From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wojciech Meyer Newsgroups: gmane.emacs.devel Subject: Re: Problems with xml-parse-string Date: Fri, 24 Sep 2010 11:44:11 +0100 Message-ID: References: <87pqw6d7nz.fsf@stupidchicken.com> <87zkvaiked.fsf@stupidchicken.com> <87vd5ymptn.fsf@stupidchicken.com> <87vd5x7ty2.fsf@stupidchicken.com> <87vd5wo48a.fsf@stupidchicken.com> <8739t03q2g.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1285325849 11306 80.91.229.12 (24 Sep 2010 10:57:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Sep 2010 10:57:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 24 12:57:27 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 1Oz5y3-0001hp-6R for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2010 12:57:27 +0200 Original-Received: from localhost ([127.0.0.1]:44509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oz5lR-0006Eb-Nh for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2010 06:44:25 -0400 Original-Received: from [140.186.70.92] (port=35594 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oz5lJ-0006EJ-FW for emacs-devel@gnu.org; Fri, 24 Sep 2010 06:44:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oz5lE-0006D8-I3 for emacs-devel@gnu.org; Fri, 24 Sep 2010 06:44:16 -0400 Original-Received: from mail-qy0-f169.google.com ([209.85.216.169]:44255) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oz5lE-0006D2-Em for emacs-devel@gnu.org; Fri, 24 Sep 2010 06:44:12 -0400 Original-Received: by qyk7 with SMTP id 7so1205030qyk.0 for ; Fri, 24 Sep 2010 03:44:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7Ps9fzHvlPXW7cwuUUAymMj5kC+z7yL2hvUm9yeI9Vw=; b=FA12PsEf6RxwkepPuWSi1T00Mz05zl6k71kXPOignyMnWSRgKUCO1N8y3EFokKmzc0 nMljzxAyKiQ4stW2WVo0Hve/BklQVEcioAixMAKCr/kmCloFt698wjSo04L6ivlqyXAg 1g5o/vMQOI8LCCmCUnAe/TDPsdJggOmSxBylc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=PYdR2yNTluPjkQsGyyRZ7kf76/9IpGLFz99ku7jvJcQiQvhlcL74Q+IdpP8jbhp7VL 00lDqHJseCawhte5au1/RYWK+MMRqHaZXCiFl/IpU27JG/7tazv6R0mYcSIUcAyEBo8U YCP+Nt+SGsrdpGKMxlRYw41q+wt+WIZs1qBU0= Original-Received: by 10.224.60.133 with SMTP id p5mr2269837qah.323.1285325051717; Fri, 24 Sep 2010 03:44:11 -0700 (PDT) Original-Received: by 10.229.31.139 with HTTP; Fri, 24 Sep 2010 03:44:11 -0700 (PDT) In-Reply-To: <8739t03q2g.fsf@stupidchicken.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:130749 Archived-At: On Fri, Sep 24, 2010 at 2:09 AM, Chong Yidong wrote= : > Lars Magne Ingebrigtsen writes: > >> Stefan Monnier writes: >> >>>> As for the :foo node names, we can map them to anything else if >>>> required. =A0Pick an invalid XML character -- any one will do, if this= is >>>> important. >>> >>> How 'bout =3Dfoo ? >> >> Looks good to me. > > If we're going to make a clean break with the old xml.el parse tree > format, I think it makes more sense to go with sxml. =A0Is there any > technical reason not to? =A0(Aside from the obnoxious all caps, which we > can safely omit.) Thanks. I've read all the other messages and here I'm proposing solutions for both problems: - for ':' or any other special Emacs prefix character only we can generate a string. The drawback of this solution is that no-longer the output is consistent and conforming to Sxml, but the advantage is that it handles all the corner cases, and I cannot think about better solution. We'd need a special handling code, abstracting access to it (but that's a good idea anyway, and it would happen anyway with the `prefix|replacement' solution). Another advantage of trying keeping symbols, is that we can possibly eval code directly, without any transformation, and the data is more natural and expressive. Also, there could be functions, xml-valid-smxlp, xml-can-evalp, for testing various properties. - for the problem with polluting obarrays with random interned symbols, David's solution would work. Wojciech