+ the code that I already have in lyx2lyx deals easily with all the other stuff (the patch I was working follows attached, this is only an hint we could use a different implementation but I think that this server as a good first step to boost the discussion on the topic).
FYI, I think one write_xml() routine is enough. ;-) rh
