From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.lisp.guile.bugs Subject: bug#20339: sxml simple: sxml->xml mishandles namespaces? Date: Tue, 12 Feb 2019 10:56:02 +0100 Message-ID: <20190212095602.GD13448@tuxteam.de> References: <20150415194714.GA30295@tuxteam.de> <87y45vln0f.fsf@pobox.com> <20160713132403.GA2349@tuxteam.de> <87furc1qeu.fsf@pobox.com> <87a7jbi8rx.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pk6IbRAofICFmK5e" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="56074"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 20339@debbugs.gnu.org To: Ricardo Wurmus Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Feb 12 11:08:42 2019 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtUza-000EQ3-1H for guile-bugs@m.gmane.org; Tue, 12 Feb 2019 11:08:42 +0100 Original-Received: from localhost ([127.0.0.1]:36585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtUzY-0002gM-V7 for guile-bugs@m.gmane.org; Tue, 12 Feb 2019 05:08:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtUzL-0002De-3z for bug-guile@gnu.org; Tue, 12 Feb 2019 05:08:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtUoN-00048z-No for bug-guile@gnu.org; Tue, 12 Feb 2019 04:57:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtUoI-000448-K9 for bug-guile@gnu.org; Tue, 12 Feb 2019 04:57:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gtUoI-0002Se-Cm for bug-guile@gnu.org; Tue, 12 Feb 2019 04:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: tomas@tuxteam.de Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 12 Feb 2019 09:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20339 X-GNU-PR-Package: guile Original-Received: via spool by 20339-submit@debbugs.gnu.org id=B20339.15499653739393 (code B ref 20339); Tue, 12 Feb 2019 09:57:02 +0000 Original-Received: (at 20339) by debbugs.gnu.org; 12 Feb 2019 09:56:13 +0000 Original-Received: from localhost ([127.0.0.1]:44428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtUnV-0002RQ-4H for submit@debbugs.gnu.org; Tue, 12 Feb 2019 04:56:13 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:52178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtUnQ-0002RF-BX for 20339@debbugs.gnu.org; Tue, 12 Feb 2019 04:56:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Qyl3/uqExotiKF+0PI1Es89oxwo4tCnHaYWu6Vuhh80=; b=WDD6Mg/C9iHhNgIbwJ96LxsoW9aPFk6Lr3JU9cGUR5mocNgdavgHebttNr9+x/WUA7WZX5FwOV97kQoFLQ5xk4ZiAmNfgrAd9hzDBcG56z7VVurp9OQExPNTVFjcSGr0GI50APbxkADQcTy54eFA0ZodxKZZcac6Ky2wabTT54tLFGBT0JPqY/QGHDS3L1YhWf21THRpyo5ylS6Fn+IJL1HmT8GXW8cownU1CYO1F8YwEkoxPF3WZQ+sqiSq1//UxFfBy42qFI25Kafgi2atZFoNEi8kNBfJ2zL669bCmiPOCRrs8uSL9Jc8ie3n8GXTPsZTHw87U7vHns+Vb8ex9Q==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1gtUnK-0004XC-Lt; Tue, 12 Feb 2019 10:56:02 +0100 Content-Disposition: inline In-Reply-To: <87a7jbi8rx.fsf@elephly.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9304 Archived-At: --Pk6IbRAofICFmK5e Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 04, 2019 at 09:44:02PM +0100, Ricardo Wurmus wrote: > Hello! >=20 > I just looked at this again and I think I came with something useful. > Here=E2=80=99s some context: [...] > Attached is a patch that does the requested things. The parser > procedures like FINISH-ELEMENT have access to all the namespaces, so we > I changed the FINISH-ELEMENT procedure to return the list of namespaces > in addition to its SXML tree return value. It's great that you pick that up, I'm excited :-) I have lost a bit of contact to Guile as of late. But I'm preparing some tooling to give your patches a whirl; in the meantime a couple of comments from the peanut gallery: As John has noted, the namespace mappings (i.e. the prefix -> namespace URI binding) are kind of lexically scoped (I'd call it subtree scoped, but structurally it is the same). While parsing is "easy" (assuming well-formed XML), serializing is not unambiguous. In a way, the library might want to be prepared to take hints from the application (as far as the XML is to be read by humans, there might be "better" and "worse" serializations). It may take me a couple of days to come up to speed. Thanks a lot & cheers -- t --Pk6IbRAofICFmK5e Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEUEARECAAYFAlximDIACgkQBcgs9XrR2kbicwCWNOloNf1OUTw7vsDBAlmuxDLi egCffA4PYlxxVDtlzgdSZ4HqlUTN1o4= =DZql -----END PGP SIGNATURE----- --Pk6IbRAofICFmK5e--