Data types for working with the metadata of ePub documents
These data types were constructed by studying the IDPF OPF specification for ePub documents found here:
- data Package = Package {
- opVersion :: String
- opUniqueId :: String
- opMeta :: Metadata
- opManifest :: [ManifestItem]
- opSpine :: Spine
- opGuide :: [GuideRef]
- data MetaTitle = MetaTitle (Maybe String) String
- data MetaCreator = MetaCreator (Maybe String) (Maybe String) String
- data MetaDate = MetaDate (Maybe String) String
- data MetaId = MetaId String (Maybe String) String
- data Metadata = Metadata {
- metaTitles :: [MetaTitle]
- metaCreators :: [MetaCreator]
- metaContributors :: [MetaCreator]
- metaSubjects :: [String]
- metaDescription :: Maybe String
- metaPublisher :: Maybe String
- metaDates :: [MetaDate]
- metaType :: Maybe String
- metaFormat :: Maybe String
- metaIds :: [MetaId]
- metaSource :: Maybe String
- metaLangs :: [String]
- metaRelation :: Maybe String
- metaCoverage :: Maybe String
- metaRights :: Maybe String
- data ManifestItem = ManifestItem {
- mfiId :: MFItemId
- mfiHref :: MFItemHref
- mfiMediaType :: MFItemMediaType
- data SpineItemref = SpineItemref {}
- data Spine = Spine {}
- data GuideRef = GuideRef {}
- emptyMetadata :: Metadata
Documentation
package tag
Package | |
|
package/metadata/dc:title tag, xml:lang attr, content
data MetaCreator Source
package/metadata/dc:creator tag, opf:role attr, opf:file-as attr, content
package/metadata/dc:date tag, opf:event attr, content
package/metadata/dc:identifier tag, id attr, opf:scheme attr, content
package/metadata tag
Metadata | |
|
data ManifestItem Source
package/manifest/item tag
ManifestItem | |
|
package/spine tag
Spine | |
|
package/guide/reference tag
emptyMetadata :: MetadataSource
Note: This isn't valid as-is, some required values are empty lists!