On Mon, Feb 04, 2019 at 09:44:02PM +0100, Ricardo Wurmus wrote: > Hello! > > I just looked at this again and I think I came with something useful. > Here’s 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