From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ricardo Wurmus Newsgroups: gmane.lisp.guile.bugs Subject: bug#20339: sxml simple: sxml->xml mishandles namespaces? Date: Tue, 05 Feb 2019 10:12:06 +0100 Message-ID: <874l9iiopl.fsf@elephly.net> 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: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="81126"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.0; emacs 26.1 Cc: 20339@debbugs.gnu.org To: John Cowan Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Feb 05 11:58:20 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 1gqyQj-000Kt0-VG for guile-bugs@m.gmane.org; Tue, 05 Feb 2019 11:58:18 +0100 Original-Received: from localhost ([127.0.0.1]:58135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqyQi-0007EF-Us for guile-bugs@m.gmane.org; Tue, 05 Feb 2019 05:58:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqyQb-0007CW-2F for bug-guile@gnu.org; Tue, 05 Feb 2019 05:58:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqyQW-00066Q-L5 for bug-guile@gnu.org; Tue, 05 Feb 2019 05:58:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60951) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqyQU-00065P-Os for bug-guile@gnu.org; Tue, 05 Feb 2019 05:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqyQU-00069q-I4 for bug-guile@gnu.org; Tue, 05 Feb 2019 05:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 05 Feb 2019 10:58: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.154936428023663 (code B ref 20339); Tue, 05 Feb 2019 10:58:02 +0000 Original-Received: (at 20339) by debbugs.gnu.org; 5 Feb 2019 10:58:00 +0000 Original-Received: from localhost ([127.0.0.1]:60232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqyQS-00069a-Ew for submit@debbugs.gnu.org; Tue, 05 Feb 2019 05:58:00 -0500 Original-Received: from sender-of-o51.zoho.com ([135.84.80.216]:21117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqyQO-00069O-2H for 20339@debbugs.gnu.org; Tue, 05 Feb 2019 05:57:57 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1549357932; cv=none; d=zoho.com; s=zohoarc; b=LxINLeuV0tR7uuQtUndIcJVTPdE1zA5Ck1IDc1ECK1fcujLyNAu3Yaeq8rpheviw/sGAkcI/rjD1/5Qhl9xjrqqhb5ZGH2YBSNH7IgS2e1DGYh0qxKDPRk0b6vfQU9+4eTdwfEZPT/jBRF3o+sTYoeQVdMM68hql3paMZNmCQtQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1549357932; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=O5PO701Bi01oap6qC8cU7pcn0SPa5EGfUldj9TalWf8=; b=GoijDIlcY6xXeClzLgvJBFU18Hm9I5ZTPRQKwiEgYYNsE+UHDARuZRapPgDmUX1pgelfCkvjhLwgC9nOfRs+5YGC9tl6DrWvuPNmSTDe7dAwqThcGtCD3fA8r7AJ1bmDu4zbB3DBvPVopKnjA/KGmjWBB7xZcJfTGv8ofuXota0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1549357932; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1303; bh=O5PO701Bi01oap6qC8cU7pcn0SPa5EGfUldj9TalWf8=; b=S7033f83I9pPS/E3suPCIxdcWzenD82ZAfgJ678d1bHzOrpenImyBeAwlS6fAZJR c3qA4WbIuz5xPqze3ZxE8GKP/XXdlomj0a7FWmhkcxhl1xdPCvX4Li1dmjXbJ4jTd2s mZavg4iJXgZk4X8OiP0biIKnrWWBWU7o9RwOCQlc= Original-Received: from localhost (p3E9E957E.dip0.t-ipconnect.de [62.158.149.126]) by mx.zohomail.com with SMTPS id 1549357930133206.1824205767324; Tue, 5 Feb 2019 01:12:10 -0800 (PST) In-reply-to: X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC X-ZohoMailClient: External 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:9300 Archived-At: Hi John, > The trouble with that is that XML rnamespaces are lexically scoped, like > Scheme > local variables. It is perfectly valid to map a prefix to more than one > URL, > as long as the namespace declarations are in either disjoint or nested > elements. So you don't know what the absolute name of the element > or attribute is from just the prefix and the local part. > > Furthermore, it is also legal to define more than one prefix for > the same URL, in which case names using either prefix are normally > treated as equivalent (however, you can't have elements like > ... > even if a and b map to the same namespace). > > * Is the value for =E2=80=9Cnamespaces=E2=80=9D that=E2=80=99s passed in = to the >> FINISH-ELEMENT procedure always the same? >> >> * Will the second return value of the final call to FINISH-ELEMENT >> really always be the complete list of *all* namespaces that have been >> encountered? >> > > Definitely not, only the namespaces that are currently in scope. Thanks for the clarifications! In that case we coud have FINISH-ELEMENT add all namespace declarations that are in scope to the current node that is about to be returned. It would be a little verbose, but more correct. What do you think? --=20 Ricardo