From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#20339: sxml simple: sxml->xml mishandles namespaces? Date: Thu, 14 Jul 2016 12:10:17 +0200 Message-ID: <87furc1qeu.fsf@pobox.com> References: <20150415194714.GA30295@tuxteam.de> <87y45vln0f.fsf@pobox.com> <20160713132403.GA2349@tuxteam.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468491087 31112 80.91.229.3 (14 Jul 2016 10:11:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jul 2016 10:11:27 +0000 (UTC) Cc: 20339@debbugs.gnu.org To: tomas@tuxteam.de Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Jul 14 12:11:16 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNdbv-0006m9-21 for guile-bugs@m.gmane.org; Thu, 14 Jul 2016 12:11:15 +0200 Original-Received: from localhost ([::1]:52630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNdbt-0001rz-Uo for guile-bugs@m.gmane.org; Thu, 14 Jul 2016 06:11:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNdbl-0001re-Uy for bug-guile@gnu.org; Thu, 14 Jul 2016 06:11:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNdbi-00084I-Lx for bug-guile@gnu.org; Thu, 14 Jul 2016 06:11:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNdbi-00084E-Hy for bug-guile@gnu.org; Thu, 14 Jul 2016 06:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bNdbi-0001rR-FD for bug-guile@gnu.org; Thu, 14 Jul 2016 06:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 14 Jul 2016 10:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20339 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 20339-submit@debbugs.gnu.org id=B20339.14684910297110 (code B ref 20339); Thu, 14 Jul 2016 10:11:02 +0000 Original-Received: (at 20339) by debbugs.gnu.org; 14 Jul 2016 10:10:29 +0000 Original-Received: from localhost ([127.0.0.1]:50557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNdbB-0001qc-Iu for submit@debbugs.gnu.org; Thu, 14 Jul 2016 06:10:29 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:52537 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNdb9-0001qS-Q2 for 20339@debbugs.gnu.org; Thu, 14 Jul 2016 06:10:28 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 2CEE924B17; Thu, 14 Jul 2016 06:10:25 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=BMXjZYHe7FoMrTAHw4gJAuxvmcE=; b=HsGvJo 7tmpzP013YDbLVJEvYrvReCyRoPTVqGTLzKpYCmMzXHfgP/nu+K3egJruWscjamU k+Mml/xoz30gUU9OUWINloXU9Ohh/OnpZz07i7HpB6wRxVpR1QdhvBeOpxLoTKFW t5yAzcB4rXqz0+kpVwXh9ZR5fxM4rHyvJZ0n8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=NQjFYk/wG3MBm4KXR+7/Nj8Y/QDZ/1A9 GW2Tb9P6EItfZeC2xLoTg9TXnpkSFpxbVEJmLAbCWzrZgb9Dt6IeUwbTA01y19Zs q4TPEPAWdaGr+Q5+7sFyoJGkOSSn2Auo+WW8KkM2DwNM2jUTmXMCpKuRCkbRZaj1 92eOR0D8YxI= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 1674C24B13; Thu, 14 Jul 2016 06:10:25 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id 2C8C524B12; Thu, 14 Jul 2016 06:10:24 -0400 (EDT) In-Reply-To: <20160713132403.GA2349@tuxteam.de> (tomas@tuxteam.de's message of "Wed, 13 Jul 2016 15:24:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: 2E2ADE00-49AB-11E6-9089-28A6F1301B6D-02397024!pb-sasl2.pobox.com 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: 208.118.235.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:8304 Archived-At: Hi :) On Wed 13 Jul 2016 15:24, tomas@tuxteam.de writes: > Referring to Oleg Kiseliov's paper [1], there are actually three > things involved: This summary is helpful, thanks. > What is missing? From my point of view: > > - At xml->sxml time, the user doesn't know which namespaces > are in the xml. So it would be nice if the XML parser > could provide that. For some documents you do know, of course. And for larger perspective, I think that SSAX gives you all the tools you need to build specialist and very flexible XML parsers. So to an extent solving the general problem isn't necessary -- we can always point people to SSAX. But that's a bit rude ;) so if there are common patterns we should try to capture them in xml->sxml. I see this bug as being a search for those patterns, but without the requirement of solving the problem in its most general form. > - It would be super-nice if the XML parser could put that > into the same nodes it found it, as described in [1] > (i.e. in the (*NAMESPACES* ...) pseudo-attribute). > This way we wouldn't have a global mapping, but one > that resembles the original XML, even with the same > prefixes. Less surprises overall. The round trip > xml -> sxml -> xml would be (nearly) the identity. > > With Ricardo's patch it would lump all the namespace > declarations up in the top node, which formally is > correct, but might scare XML people a bit :-) ACK. > - At sxml->xml time there should be a way to somehow > generate prefixex for "new" namespaces. I don't know > at the moment how this would work, that depends on > how the user is supposed to insert new nodes in the > SXML. Does she specify the namespace? Both prefix > (aka namespace-id, under my current assumption) *and* > namespace? (note that the namespace-id/prefix alone > wouldn't be sufficient). ACK. What do you think the next step is? I am happy to wait FWIW, dunno if Ricardo has any feelings here. Enjoy your holiday :) Andy