From the code at https://github.com/Glose/dawn/blob/1e17aad2ebb54b948c5067ef0a592a0846892ba1/dawn/epub.py#L99C9-L99C17 it looks like the media-type, which from my (limited) research appears to be an obligatory property for all recent versions of the spec, is simply ignored. When I open an epub and then try and get the mediatype, it seems to just look at the href, rather than first trying to use what was provided.
Is there some explanation of this choice somewhere? I am getting an item that ends with .xml interpreted as application/xhtml+xml by mimetypes when it is clearly marked in the source opf as application/oebps-page-map+xml. Granted, application/oebps-page-map+xml is not a legal type but the file is definitely not application/xhtml+xml either... And it would be good to have some way to bring that info forward. Any pointers?
From the code at https://github.com/Glose/dawn/blob/1e17aad2ebb54b948c5067ef0a592a0846892ba1/dawn/epub.py#L99C9-L99C17 it looks like the
media-type, which from my (limited) research appears to be an obligatory property for all recent versions of the spec, is simply ignored. When I open an epub and then try and get themediatype, it seems to just look at thehref, rather than first trying to use what was provided.Is there some explanation of this choice somewhere? I am getting an item that ends with
.xmlinterpreted asapplication/xhtml+xmlbymimetypeswhen it is clearly marked in the sourceopfasapplication/oebps-page-map+xml. Granted,application/oebps-page-map+xmlis not a legal type but the file is definitely notapplication/xhtml+xmleither... And it would be good to have some way to bring that info forward. Any pointers?