epub格式解析 您所在的位置:网站首页 epub文件格式解析 epub格式解析

epub格式解析

2023-11-09 02:18| 来源: 网络整理| 查看: 265

EPUB 2 was initially standardized in 2007 as a successor format to the Open eBook Publication Structure or "OEB", which was originally developed in 1999. A maintenance release, EPUB 2.0.1, approved in 2010, was the final release in the EPUB 2 branch.

In October, 2011, EPUB 3 superseded EPUB 2 when EPUB 3.0 was approved as a final Recommended Specification. A maintenance release, EPUB 3.0.1, was approved as a Final Recommended specification and became the current version of EPUB in June, 2014.

简介

epub格式是一种常见的电子书格式,其优点是体积小、与设备无关,在任何尺寸的屏幕上都能自动排版,因此比较流行。

epub格式建立在EPUB标准的基础之上。目前EPUB标准的最新版本是3.0.1,EPUB 3较其前一版本EPUB2有较大改动。EPUB 2在2007年发布,2010年的EPUB 2.0.1是EPUB 2的最后一个版本。EPUB 3在2011年10月发布,并被IDOP组织认可为最终推荐规范,EPUB 3取代了EPUB 2。2014年7月,EPUB 3.0.1发布。

先来看一下EPUB 2.0.1

EPUB 2.0.1

EPUB 2.0.1 is a maintenance release of EPUB 2. Its development was chartered in 2009, and the final standard was approved by the IDPF Membership as a Recommended Specification in May, 2010.

EPUB 2.0.1 is defined by three open standard specifications, the Open Publication Structure (OPS), Open Packaging Format (OPF) and Open Container Format (OCF)

EPUB 2.0.1 was superseded by EPUB 3.0 in October, 2011. As of June 2014 the latest released version of EPUB is EPUB 3.0.1. EPUB 2.x is now considered obsolete and is no longer under active maintenance.

EPUB 2.0.1包含三个部分,也就是三个标准:

内容容器标准(a content container standard:开放容器格式,Open Container Format - OCF):OCF定义了把一组文件集合打包进一个ZIP压缩文件的规则。 打包标准(a packaging atandard:开放打包格式,Open Packaging Format - OPF):此标准定义了把一个OPS出版物的不同组件组合在一起的机制和提供了电子出版物的附加的结构和语义。OPF的作用如下: 描述和引用电子出版物的所有组件(例如:markup files、images、navigation structures) 提供出版级别元数据 指定出版物的线性阅读顺序 提供了一种指定描述全局导航结构(NCX)的机制 内容审定标准(a content markup standard:开放出版结构,Open publication Structure - OPS):OPS提供了一种表示电子出版物内容的标准。

EPUB 3较EPUB 2有较大改进,除了OCF其他两个标准都进行了修改,并添加了一个新的标准。

EPUB 3, the third major release of the standard, consists of a set of four specifications, each defining an important component of an overall EPUB Publication:

EPUB Publications 3.0 [Publications30], which defines publication-level semantics and overarching conformance requirements for EPUB Publications. EPUB Content Documents 3.0 [ContentDocs30], which defines profiles of XHTML, SVG and CSS for use in the context of EPUB Publications. EPUB Open Container Format (OCF) 3.0 [OCF3], which defines a file format and processing model for encapsulating a set of related resources into a single-file (ZIP) EPUB Container. EPUB Media Overlays 3.0 [MediaOverlays30], which defines a format and a processing model for synchronization of text and audio.

EPUB 3由四部分组成:

EPUB Publications 3.0:取代OPF2.0.1。 EPUB Content Documents 3.0:取代OPS2.0.1。 EPUB Open Container Format (OCF) 3.0:继承自OCF2.0.1。 EPUB Media Overlays 3.0:定义文字和音频同步的格式和处理模式。 EPUB3和EPUB2比较 Area EPUB 3 Specification EPUB 2.0.1 Specification Overview EPUB 3 Overview (throughout) Publication-level Specification & Package Docs EPUB Publications 3.0 Open Packaging Format 2.0.1 EPUB Navigation Documents EPUB Content Documents 3.0 N/A (NCX referenced as DAISY specification) Media Overlays EPUB Media Overlays 3.0 N/A Container packaging EPUB Open Container Format 3.0 Open Container Format 2.0.1 Changes from previous version EPUB 3 Changes from EPUB 2.0.1 (throughout) 文件组成

一个未经加密处理的epub电子书由以下三部分组成:

META-INF(文件夹,有一个文件container.xml) OEBPS(文件夹,包含images文件夹、很多xhtml文件、*.css文件和content.opf文件) mimetype 文件mimetype

每一个epub电子书均包含一个名为mimtype的文件,且内容不变,用以说明epub的文件格式。文件内容为:

application/epub+zip 目录:META-INF

META-INF用于存放容器信息,默认情况下改目录包含一个文件,即container.xml,文件内容如下:

123456

container.xml文件的主要功能用于告诉阅读器,电子书的根文件(rootfile)的路径和打开格式,一般来说,该containerxml文件也不需要任何修改,除非改变了根文件的路径和文件名称。 除了container.xml文件之外,OCF还规定了以下几个文件:

manifest.xml 文件列表 metadata.xml 元数据 signatures.xml 数字签名 encryption.xml 加密 rights.xml 权限管理

这些目录是可选的

目录:OEBPS

OEPBS目录用于存放OPF文档、CSS文件、NCX文档。

OPF文件(★)

OPF文档是epub的核心文件,且是一个标准的xml文件,依据OPF规范,此文件的根元素为

其内容主要由五部分组成:

1.

元数据信息,此信息是书籍的出版信息,由两个子元素组成。

(1),其元素构成采用dubline core(DC)的15项核心元素,包括:

:标题 :责任者 :主题词或关键词 :内容描述 :日期 :类型 :出版者 :发行者 :格式 :标识信息 :来源信息 :语言 :相关资料 :覆盖范围 :权限描述

(2)

扩展元素。如果有些信息在上述元素中无法描述,则在此元素中进行扩展。

例如:

1234567891011121314


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有