Hmm, a problem is that the filetype is hardcoded in the HTML file itself, and there's really no way to make that intellgently select the right kind of file. However, I think browsers generally ignore the filetype given in the HTML, because they've already have to have decided that the file is HTML before they can even see it. So maybe I could hardcode that as application/xhtml+xml...