Adding one more instance to the avalance of ePub tools: I've been working for a couple of months to covert TEI (Text Encoding Initiative) files to ePub, mainly using XSLT scripts, and glued together with Perl.
Not for the faint of heart (all command-line, several external tools needed, no GUI, etc.)
The results are in Google code: http://code.google.com/p/tei2html/
The name is historical, original the scripts turned TEI into HTML, and since ePub is zipped up HTML, the additional conversion to ePub was not that hard.
I still working on it, and will probably be back in the forums here for your collective wisdom.