What's Inward An Epub Three Filename? Non Much, It's All Inward The Extension ... Close Of The Time.
An interesting query popped upwards on twitter today
as well as it reminded me nearly how nosotros larn thence used to the names nosotros assign to files as well as folders within our EPUB structures that nosotros mightiness forget which are laid inwards rock as well as which we've assigned or convey been arbitrarily assigned past times apps similar InDesign for us.tin anyone inwards #eprdctn confirm that the nav file tin last named something other than nav.xhtml & nevertheless operate OK? seeing nix inwards spec— Iris Amelia 📎✊🏽 (@epubpupil) January 31, 2017
Thankfully it is fairly clear cut. The mimetype as well as files within the META-INF folder (along amongst the folder itself) convey fixed names. But the simply required i that must last inwards the folder is the container.xml file as well as this file identifies the source file of the EPUB package, i.e. the i that identifies the place of all the others. All other files as well as folders tin convey their names freely chosen (within the limits of unicode).
META-INF/container.xml
The IDPF provides the next instance of what the container.xml file mightiness expect similar (and largely does):<?xml version="1.0"?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="EPUB/My Crazy Life.opf" media-type="application/oebps-package+xml" /> </rootfiles> </container>The text of this file is fixed inwards all but the full-path, which is exclusively laid past times the creator but must indicate to a file amongst the OPF extension. This way that the folder bring upwards as well as file bring upwards contained inwards the path tin last called anything equally long equally they stand upwards for the folder as well as filename inwards the actual EPUB. This allows for multiple source files where dissimilar versions of the mass are contained within the same packet (see IDPF example).
Additional files inwards the META-INF folder
Other files that may last included inwards the META-INF folder are (1) an encryption.xml file, which must last added if whatsoever content is encrypted; (2) manifest.xml as well as metadata.xml, which are reserved names that may last used but convey yet to convey their operate as well as inner tags defined past times the spec; (3) the rights.xml file is available to grip DRM, but its utilisation is i time once again undefined past times the IDPF; (4) finally, the signatures.xml provides a way of including digital signatures, as well as the documentation provides details of the content for this file.mimetype
The mimetype file is a fixed as well as unproblematic one-line file:
application/epub+zip
But in that place are surely rules nearly this file:
OCF ZIP Containers must include a mimetype file equally the get-go file inwards the Container, as well as the contents of this file must last the MIME type string application/epub+zip encoded inwards US-ASCII [US-ASCII].
The contents of the mimetype file must non comprise whatsoever leading padding or whitespace, must non start out amongst the Unicode signature (or Byte Order Mark), as well as the instance of the MIME type string must last just equally presented above. The mimetype file additionally must non last compressed or encrypted, as well as in that place must non last an extra plain inwards its ZIP header.Note inwards exceptional the requirement of US-ASCII text-encoding rather than Unicode, as well as the avoidance of whatsoever whitespace unopen to the text.
Content of the OPF file
The OPF (or Package Document) has a root-level tag afterward the XML annunciation called the package element, which requires version and unique-identifier attributes to last fulfilled. It must besides convey iii nested tags: metadata, manifest and spine, which inwards plough convey their ain nested elements.
Within the essential requirements of the OPF file, nosotros convey the barebones of an EPUB document. As long equally nosotros fulfil these requirements, i of the most crucial of which is the manifest's requirement that just i item must identified equally the EPUB Navigation Document (and that this file must be inwards the EPUB), thence nosotros volition convey along amongst the META-INF content as well as mimetype a valid EPUB i time zipped together.
Note: equally a indicate of involvement the EPUB Navigation Document tin besides last re-used equally a tabular array of contents for within the EPUB.
Within the essential requirements of the OPF file, nosotros convey the barebones of an EPUB document. As long equally nosotros fulfil these requirements, i of the most crucial of which is the manifest's requirement that just i item must identified equally the EPUB Navigation Document (and that this file must be inwards the EPUB), thence nosotros volition convey along amongst the META-INF content as well as mimetype a valid EPUB i time zipped together.
Note: equally a indicate of involvement the EPUB Navigation Document tin besides last re-used equally a tabular array of contents for within the EPUB.
Comments
Post a Comment