From: Andy Wingo <wingo@pobox.com>
To: tomas@tuxteam.de
Cc: 20339@debbugs.gnu.org
Subject: bug#20339: sxml simple: sxml->xml mishandles namespaces?
Date: Thu, 14 Jul 2016 12:10:17 +0200 [thread overview]
Message-ID: <87furc1qeu.fsf@pobox.com> (raw)
In-Reply-To: <20160713132403.GA2349@tuxteam.de> (tomas@tuxteam.de's message of "Wed, 13 Jul 2016 15:24:03 +0200")
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
next prev parent reply other threads:[~2016-07-14 10:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 19:47 bug#20339: sxml simple: sxml->xml mishandles namespaces? tomas
2015-04-20 7:45 ` bug#20339: [PATCH] sxml->xml and namespaces: updated patch tomas
2015-04-21 9:24 ` bug#20339: sxml simple: sxml->xml mishandles namespaces? Ricardo Wurmus
2015-04-21 9:44 ` tomas
2015-04-22 14:29 ` Ricardo Wurmus
2015-04-23 6:57 ` tomas
2015-04-23 7:04 ` Ricardo Wurmus
2015-04-23 7:40 ` tomas
2015-04-25 20:25 ` tomas
2015-04-26 10:28 ` tomas
2016-06-23 19:32 ` Andy Wingo
2016-07-13 13:24 ` tomas
2016-07-13 18:08 ` tomas
2016-07-14 10:10 ` Andy Wingo [this message]
2016-07-14 10:26 ` tomas
2019-02-04 20:44 ` Ricardo Wurmus
2019-02-04 22:55 ` John Cowan
2019-02-05 9:12 ` Ricardo Wurmus
2019-02-05 12:57 ` Ricardo Wurmus
2019-04-08 12:14 ` tomas
2019-02-12 9:56 ` tomas
2019-02-12 20:30 ` Ricardo Wurmus
2019-05-03 10:46 ` bug#20339: Taking a step back (was: sxml simple: sxml->xml mishandles namespaces?) tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87furc1qeu.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=20339@debbugs.gnu.org \
--cc=tomas@tuxteam.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).