-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Jul 13, 2016 at 03:24:03PM +0200, to...@tuxteam.de wrote:
[...] > 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. > > - 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 :-) > > - 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). Argh. First post, then think, sorry. Actually ditch the last point. I think it would be OK to make the user responsible to keep the *NAMESPACES* pseudo-attribute up-to-date whenever she adds nodes with new namespaces to the SXML. regards [1] http://okmij.org/ftp/papers/SXML-paper.pdf - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAleGg7YACgkQBcgs9XrR2kY7hACdG5drjpPVlzB4wW6sXhuRKliv h3cAnAmHC5RxiEc6RXi0tu5U3yF4YYbx =7uGa -----END PGP SIGNATURE-----