hi jamp, i think you've described what quite a lot of people want for ebooks. but it sounds to me very much like the epub format, which is already being defined. have you taken a look at that ? it's based on xhtml (so, xml, basically) and css, and a couple of format-specific files for metadata and such. you can get more info about it on the
idpf site.
you might also want to look at sigil, the epub editor being developped by valloric ; it has its own forum here. if you are a developpeur and interested in helping out with that, i think valloric would be really happy to get some plug-ins or something.