Subject: Re: bug#20339: sxml simple: sxml->xml mishandles namespaces?

From: [email-masked]
Date: Thu, 23 Apr 2015 09:40:34 +0200

On Thu, Apr 23, 2015 at 09:04:46AM +0200, Ricardo Wurmus wrote:
> 
> [email-masked] writes:
> 
> > What's yet missing (as far as I can read off the diff) is a way to
> > "dream up" an abbreviation when it's not in the namespaces alist.
> 
> True.
> 
> Ideally, this should work even without passing a namespaces alist at all
> in both "xml->sxml" and "sxml->xml".  The non-abbreviated namespaces
> should not cause "sxml->xml" to fail.
> 
> Passing around a namespaces alist to both these procedures is the least
> invasive approach I could think of, but I still think that it *should*
> be made to work without explicitly declaring namespaces.

I think a combination of our approaches could work: the only difference
(apart of the code elegance) is that my patch grows this alist on its
way down the tree as it encounters new namespace. This meshes well with
the namespace declaration, which scopes recursively down the XML tree.

This afternoon, while I sit at the e-Lok waiting for the FSFE meeting
is a very good moment for me to look into it. I'll report tonight :-)

Thanks & later (dayjob calling)
- -- tomás