W3C Recommendation
W3C 建議 2023 年 5 月 25 日
See also
translations.
另請參閱翻譯。
Copyright © 1999-2023
International Digital Publishing Forum
and
World Wide Web Consortium.
W3C®
liability,
trademark and
permissive document license rules apply.
版權所有 © 1999-2023 國際數位出版論壇和萬維網聯盟。W3C ® 責任、商標和許可文檔許可規則適用。
EPUB® 3 defines a distribution and interchange format for digital publications and documents. The EPUB
format provides a means of representing, packaging, and encoding structured and semantically enhanced
web content — including HTML, CSS, SVG, and other resources — for distribution in a single-file
container.
EPUB® 3 定義了數位出版物和文檔的分發和交換格式。EPUB 格式提供了一種表示、打包和編碼結構化和語義增強的 Web 內容(包括 HTML、CSS、SVG 和其他資源)的方法,以便在單個檔容器中分發。
This specification defines the authoring requirements for EPUB publications and represents the third
major revision of the standard.
該規範定義了 EPUB 出版物的創作要求,代表了該標準的第三次主要修訂。
This section describes the status of this
document at the time of its publication. A list of current W3C
publications and the latest revision of this technical report can be found
in the W3C technical reports index at
https://www.w3.org/TR/.
本節介紹本文檔發佈時的狀態。當前 W3C 出版物清單和本技術報告的最新版本可在 https://www.w3.org/TR/ 的 W3C 技術報告索引中找到。
This document was published by the EPUB 3 Working Group as
a Recommendation using the
Recommendation track.
本文檔由 EPUB 3 工作組使用建議書軌道作為建議書發佈。
W3C recommends the wide deployment of this specification as a standard for
the Web.
W3C 建議將此規範作為 Web 標準廣泛部署。
A W3C Recommendation is a specification that, after extensive
consensus-building, is endorsed by
W3C and its Members, and
has commitments from Working Group members to
royalty-free licensing
for implementations.
Future updates to this Recommendation may incorporate
new features.
W3C 推薦標準是經過廣泛共識建立后,由 W3C 及其成員認可的規範,工作組成員承諾免版稅許可實施。本建議書的未來更新可能會包含新功能。
This document was produced by a group
operating under the
W3C Patent
Policy.
W3C maintains a
public list of any patent disclosures
made in connection with the deliverables of
the group; that page also includes
instructions for disclosing a patent. An individual who has actual
knowledge of a patent which the individual believes contains
Essential Claim(s)
must disclose the information in accordance with
section 6 of the W3C Patent Policy.
本文檔由一個根據 W3C 專利政策運作的小組編寫。W3C 維護著與該小組的可交付成果相關的任何專利披露的公開清單;該頁面還包括披露專利的說明。如果個人實際瞭解其認為包含基本權利要求的專利,則必須根據 W3C 專利政策第 6 節披露該資訊。
This document is governed by the
2 November 2021 W3C Process Document.
本文檔受 2021 年 11 月 2 日 W3C 流程文檔的約束。
This section is non-normative.
本節是非規範性的。
EPUB 3 has been widely adopted as the format for digital books (ebooks), and this revision continues
to increase the format's capabilities to better support a wider range of publication requirements,
including complex layouts, rich media and interactivity, and global typography features. The
expectation is that publishers will utilize the EPUB 3 format for a broad range of content,
including books, magazines, and educational, professional, and scientific publications.
EPUB 3 已被廣泛採用為數位圖書 (ebooks) 的格式,此次修訂繼續增強該格式的功能,以更好地支援更廣泛的出版要求,包括複雜的佈局、富媒體和交互性以及全域排版功能。預計出版商將 EPUB 3 格式用於廣泛的內容,包括書籍、雜誌以及教育、專業和科學出版物。
This specification represents the core of EPUB 3 and includes the conformance requirements for EPUB publications — the product of the standard. The other specifications that comprise EPUB 3 are as
follows:
該規範代表了 EPUB 3 的核心,包括 EPUB 出版物(標準的產物)的一致性要求。包含 EPUB 3 的其他規格如下:
EPUB 3 Reading Systems [epub-rs-33] — defines the processing
requirements for EPUB reading systems — the applications that consume EPUB publications
and present their content to users.
EPUB 3 閱讀系統 [ epub-rs-33] — 定義 EPUB 閱讀系統的處理要求 — 使用 EPUB 出版物並將其內容呈現給使用者的應用程式。
EPUB Accessibility [epub-a11y-11] — defines accessibility
conformance and discovery requirements for EPUB publications.
EPUB 輔助功能 [ epub-a11y-11] — 定義 EPUB 出版物的輔助功能一致性和發現要求。
These specifications represent the formal list recognized as belonging to EPUB 3 and that contain
functionality normatively referenced as part of the standard. The development of extension
specifications periodically adds new functionality to EPUB publications. Features and functionality
defined outside of core revisions to the standard, while not formally recognized in this
specification, are nonetheless available for EPUB creators and reading system developers to
use.
這些規範代表了公認的屬於 EPUB 3 的正式清單,其中包含作為標準一部分規範引用的功能。擴展規範的開發會定期向 EPUB 出版物添加新功能。在標準核心修訂版之外定義的特性和功能,雖然未在本規範中得到正式認可,但仍可供EPUB創建者和閱讀系統開發人員使用。
The non-normative EPUB 3 Overview [epub-overview-33] provides
a general introduction to EPUB 3. A list of technical changes from the previous version is also
available in the change log.
非規範性 EPUB 3 概述 [ epub-overview-33] 提供了 EPUB 3 的一般介紹。更改日誌中還提供了與先前版本相比的技術更改清單。
This section is non-normative.
本節是非規範性的。
This section reviews the organization of this specification through the central product it defines:
the EPUB publication.
本節通過它定義的核心產品(EPUB 出版物)回顧了本規範的組織。
An EPUB publication is, in its most basic sense, a bundle of resources with instructions on how to
render those resources to present the content in a logical order. The types of resources that are
allowed in EPUB publication, as well as restrictions on their use, are defined in 3. Publication resources.
從最基本的意義上說,EPUB 出版物是一組資源,其中包含有關如何呈現這些資源以按邏輯順序呈現內容的說明。EPUB 出版物中允許的資源類型及其使用限制在 3 中定義。出版資源。
A ZIP-based archive with the file extension .epub
bundles the EPUB publication's
resources for distribution. As conformant ZIP archives, EPUB publications can be unzipped by many
software programs, simplifying both their production and consumption.
帶有文件擴展名 .epub
的基於 ZIP 的存檔捆綁了 EPUB 出版物的資源以供分發。作為符合標準的 ZIP 存檔,EPUB 出版物可以由許多軟體程式解壓縮,從而簡化其生產和使用。
The container format not only provides a means of determining that the zipped content represents an
EPUB publication (the mimetype
file), but also provides a universally named directory
of non-normative resources (/META-INF
). Key among these resources is the
container.xml
file, which directs reading systems to the available package documents. Refer to 4. Open Container Format (OCF) for more information about the container format.
容器格式不僅提供了一種確定壓縮內容是否代表 EPUB 出版物( mimetype
檔)的方法,而且還提供了非規範性資源 ( /META-INF
) 的通用命名目錄。這些資源中的關鍵是 container.xml
檔,它將讀取系統定向到可用的包文檔。請參閱 4。打開容器格式 (OCF) 以獲取有關容器格式的詳細資訊。
An EPUB publication is typically represented by a single package document. This document includes
metadata used by reading systems to present the content to the user, such as the title and
author for display in a bookshelf as well as rendering metadata (e.g., whether the content is
reflowable or has a fixed layout). It also provides a manifest of resources and includes a spine that lists the default sequence in which to render documents as a user progresses
through the content. Refer to 5. Package document for the requirements for the package
document.
EPUB 出版物通常由單個包文檔表示。本文檔包括閱讀系統用於向使用者呈現內容的元數據,例如在書架上顯示的標題和作者以及呈現元數據(例如,內容是否可重排或具有固定佈局)。它還提供資源清單,並包括一個主幹,該主幹列出了使用者在瀏覽內容時呈現文檔的預設順序。請參閱 5。包文檔,瞭解包文檔的要求。
The actual content of an EPUB publication — what users are presented with when they begin reading —
is built on the Open Web Platform and comes in two flavors: XHTML and SVG. Called EPUB content documents, these documents typically reference many additional resources required for their proper
rendering, such as images, audio and video clips, scripts, and style sheets.
EPUB 出版物的實際內容(用戶開始閱讀時看到的內容)建立在開放Web平臺上,有兩種風格:XHTML 和SVG。這些文檔稱為EPUB內容文檔,通常引用正確呈現所需的許多其他資源,例如圖像、音訊和視頻剪輯、腳本和樣式表。
Refer to 6. EPUB content documents for detailed information about the rules and requirements to
produce EPUB content documents, and [epub-a11y-11] for accessibility requirements.
請參閱 6。EPUB 內容文件,瞭解有關生成 EPUB 內容文件的規則和要求的詳細資訊,以及 [ epub-a11y-11] 的輔助功能要求。
An EPUB publication also includes another key file called the EPUB navigation document. This
document provides critical navigation capabilities, such as the table of contents, that allow users
to navigate the content quickly and easily. The navigation document is a specialized type of XHTML content document which also allows EPUB creators to use it in the content (i.e., avoiding one
table of contents for machine processing and another for user consumption). Refer to 7. EPUB navigation document for more information about this document.
EPUB 出版物還包括另一個稱為 EPUB 導航文檔的密鑰檔。本文檔提供了關鍵的導航功能,如目錄,使用戶能夠快速輕鬆地瀏覽內容。導航文檔是一種特殊類型的 XHTML 內容文檔,它還允許 EPUB 建立者在內容中使用它(即,避免一個目錄用於機器處理,另一個目錄用於使用者使用)。請參閱 7。EPUB 導航文檔,瞭解有關此文檔的詳細資訊。
EPUB publications by default are intended to reflow to fit the available screen space. It is also
possible to create publications that have pixel-precise fixed layouts using images and/or CSS
positioning. The metadata to control layouts are defined in 8. Layout rendering control.
默認情況下,EPUB 出版物旨在重排以適應可用的屏幕空間。還可以使用圖像和/或 CSS 定位創建具有圖元精確固定佈局的出版物。用於控制佈局的元數據在8中定義。佈局呈現控制件。
Media overlay documents complement EPUB content documents. They provide declarative markup for
synchronizing the text in EPUB content documents with prerecorded audio. The result is the ability
to create a read-aloud experience where reading systems highlight the text as it is narrated.
Refer to 9. Media overlays for the definition of media overlay documents.
媒體疊加文檔是對 EPUB 內容文檔的補充。它們提供聲明性標記,用於將 EPUB 內容文件中的文字與預先錄製的音訊同步。其結果是能夠創建朗讀體驗,其中閱讀系統在敘述文本時突出顯示文本。請參閱 9。用於定義媒體疊加文檔的媒體疊加。
While conceptually simple, an EPUB publication is more than just a collection of HTML pages and
dependent assets in a ZIP package as presented here. Additional information about the primary
features and functionality that EPUB publications provide to enhance the reading experience is
available from the referenced specifications, and a more general introduction to the features of
EPUB 3 is provided in the non-normative [epub-overview-33].
雖然概念上很簡單,但 EPUB 出版物不僅僅是 ZIP 包中 HTML 頁面和依賴資產的集合,如此處所示。有關 EPUB 出版物為增強閱讀體驗而提供的主要特性和功能的其他資訊,請參閱參考規範,非規範性 [ epub-overview-33] 中提供了對 EPUB 3 特性的更一般介紹。
Refer to [epub-rs-33] for the processing requirements for reading systems. Although it is not
necessary that EPUB creators read that document to create EPUB publications, an understanding of
how reading systems present the content can help craft publications for optimal presentation to
users.
請參閱 [ epub-rs-33] 了解讀取系統的處理要求。儘管 EPUB 建立者不必閱讀該文件來創建 EPUB 出版物,但瞭解閱讀系統如何呈現內容有助於製作出版物,以便以最佳方式呈現給使用者。
This section is non-normative.
本節是非規範性的。
The technologies EPUB 3 builds on are constantly evolving. Some, typically referred to as
"living" or "evergreen" standards, are subject to change daily and their impact on the validity
of EPUB publications is immediate. Others are updated less frequently and the changes may not
affect EPUB publications until EPUB 3 undergoes a new revision.
EPUB 3 所基於的技術在不斷發展。有些標準通常被稱為“活”或“常青”標準,每天都在變化,它們對 EPUB 出版物的有效性的影響是立竿見影的。其他版本的更新頻率較低,在 EPUB 3 進行新修訂之前,這些更改可能不會影響 EPUB 出版物。
In all cases, it is possible that previously valid features may become obsolete (e.g., due to a
lack of support or because of security issues). EPUB creators should therefore be cautious
about using any feature without broad support and keep their EPUB conformance checkers up to
date.
在所有情況下,以前有效的功能都可能過時(例如,由於缺乏支援或安全問題)。因此,EPUB 建立者在使用沒有廣泛支援的任何功能時應謹慎,並使其 EPUB 一致性檢查器保持最新狀態。
The [html] standard is continuously evolving — there are no longer versioned releases of it.
That standard, in turn, references various technologies that continue to evolve, such as MathML,
SVG, CSS, and JavaScript.
[ html] 標準在不斷發展 - 不再有版本版本。反過來,該標準引用了不斷發展的各種技術,例如MathML、SVG、CSS和JavaScript。
The benefit of this approach for EPUB is that EPUB publications always keep pace with changes
to the web without the need for new revisions. EPUB creators, however, must keep track of
the various changes to HTML and the technologies it references to ensure they keep their
processes up to date.
這種方法對 EPUB 的好處是,EPUB 出版物始終與網路的變化保持同步,而無需新的修訂。但是,EPUB 建立者必須跟蹤對 HTML 及其引用的技術的各種更改,以確保他們保持流程最新。
The XHTML profile defined by this specification inherits all definitions
of semantics, structure and processing behaviors from HTML unless otherwise specified.
除非另有說明,否則本規範定義的 XHTML 配置檔繼承了 HTML 語義、結構和處理行為的所有定義。
In addition, this specification defines a set of extensions
to the [html] document model that EPUB creators may include in XHTML content documents.
此外,此規範還定義了 [ html] 文檔模型的一組擴展,EPUB 建立者可以將其包含在 XHTML 內容文檔中。
This specification does not reference a specific version of [svg], but instead uses an undated
reference. Whenever there is any ambiguity in this reference, the latest recommended
specification is the authoritative reference.
此規範不引用 [ svg] 的特定版本,而是使用未註明日期的引用。每當此參考文獻中有任何歧義時,最新推薦的規範就是權威參考文獻。
This approach ensures that EPUB will always keep pace with changes to the SVG standard. EPUB creators, however, must keep track of changes to the SVG standard to ensure they keep their
processes up to date.
這種方法可確保 EPUB 始終跟上 SVG 標準的變化。但是,EPUB 建立者必須跟蹤 SVG 標準的更改,以確保他們保持流程最新。
EPUB 3 supports CSS as defined by the CSS Working Group Snapshot [csssnapshot]. EPUB 3 also
maintains some prefixed CSS properties, to ensure consistent support for global languages.
EPUB 3 支援 CSS 工作組快照 [ csssnapshot] 定義的 CSS。EPUB 3 還保留了一些前綴的 CSS 屬性,以確保對全域語言的一致支援。
EPUB 3 only supports Presentation
Markup [mathml3]. Content
Markup is only allowed in structured
markup annotations.
EPUB 3 僅支援表示標記 [ mathml3]。內容標記只允許在結構化標記批註中使用。
This specification relies on a subset of [smil3], from which the media overlays elements and
attributes defined in 9.2.2 Media overlay document definition are derived.
此規範依賴於 [ smil3] 的子集,從該子集派生出 9.2.2 媒體疊加文檔定義中定義的媒體疊加元素和屬性。
This specification refers to the [url] standard for terminology and processing related to URLs
expressed in EPUB publications. It is anticipated that new and revised web formats will
adopt this standard, but until then this may put this specification in conflict with the
internal requirements for some formats (e.g., valid relative paths), specifically with respect
to the use of internationalized URLs. If a format does not allow internationalized URLs (i.e.,
URLs must conform to [rfc3986] or earlier), that requirement takes precedence within those
resources.
本規範是指 [ url] 標準,用於與 EPUB 出版物中表示的 URL 相關的術語和處理。預計新的和修訂的 Web 格式將採用此標準,但在此之前,這可能會使該規範與某些格式(例如,有效的相對路徑)的內部要求相衝突,特別是在使用國際化 URL 方面。如果格式不允許國際化 URL(即 URL 必須符合 [ rfc3986] 或更早版本),則該要求在這些資源中優先。
This specification defines the following terms specific to EPUB 3.
本規範定義了特定於 EPUB 3 的以下術語。
Only the first instance of a term in a section links to its definition.
只有節中術語的第一個實例連結到其定義。
Codec refers to content that has intrinsic binary format qualities, such as video and audio
media types designed for optimum compression or that provide optimized streaming
capabilities.
編解碼器是指具有固有二進位格式質量的內容,例如專為最佳壓縮而設計的視頻和音訊媒體類型,或提供優化的流式處理功能。
A publication resource that is located within the EPUB container, as opposed to a
remote resource which is not.
位於 EPUB 容器中的發佈資源,而不是位於 EPUB 容器中的遠端資源。
Refer to 3.6 Resource locations for media type-specific rules for resource
locations.
有關資源位置的特定於媒體類型的規則,請參閱 3.6 資源位置。
The URL [url] of the root directory representing the OCF abstract container. It is implementation specific, but EPUB creators must assume it has properties
defined in 4.2.5 URLs in the OCF abstract container.
表示 OCF 抽象容器的根目錄的 URL [ url]。它是特定於實現的,但 EPUB 建立者必須假定它具有在 OCF 抽象容器的 4.2.5 URL 中定義的屬性。
The URL of a file or directory in the OCF abstract container, defined in 4.2.5 URLs in the OCF abstract container.
OCF 抽象容器中檔或目錄的 URL,在 OCF 抽象容器的 4.2.5 URL 中定義。
A publication resource that conforms to one of the MIME media types [rfc2046] listed in
3.2 Core media types and, therefore, does not require the provision of a
fallback (cf. foreign resource).
符合 3.2 核心媒體類型中列出的 MIME 媒體類型之一 [ rfc2046] 的發佈資源,因此不需要提供回退(參見外部資源)。
The designation "core media type resource" only applies when a resource is used in the
rendering of EPUB content documents and foreign content documents. A core media type
resource cannot be used in the spine, for example, without a fallback
unless it also has the media type of an EPUB content document.
僅當資源用於呈現EPUB內容文檔和外部內容文檔時,「核心媒體類型資源」的名稱才適用。例如,核心媒體類型資源不能在沒有回退的情況下在主幹中使用,除非它還具有 EPUB 內容文檔的媒體類型。
An application that verifies the requirements of this specification against EPUB publications and reports on their conformance.
根據 EPUB 出版物驗證本規範要求並報告其符合性的應用程式。
The ZIP-based packaging and distribution format for EPUB publications defined in 4.3 OCF ZIP container.
在 4.3 OCF ZIP 容器中定義的 EPUB 出版物的基於 ZIP 的打包和分發格式。
EPUB container and OCF ZIP container are synonymous.
EPUB 容器和 OCF ZIP 容器是同義詞。
A publication resource referenced from the spine or a manifest fallback chain that conforms to either the XHTML or SVG content document definitions.
從符合 XHTML 或 SVG 內容文件定義的主幹或清單回退鏈引用的發佈資源。
EPUB content documents contain all or part of the content of an EPUB publication (i.e.,
the textual, visual and/or audio content).
EPUB 內容文件包含 EPUB 出版物的全部或部分內容(即文字、視覺和/或音訊內容)。
EPUB creators can include EPUB content documents in the spine without the provision of fallbacks.
EPUB 建立者可以在主幹中包含 EPUB 內容文件,而無需提供回退。
An individual, organization, or process that produces an EPUB publication.
生成 EPUB 出版物的個人、組織或流程。
The creation of an EPUB publication often involves the work of many individuals, and may
be split across multiple organizations (e.g., when a publisher outsources all or part of
the work). Depending on the process used to produce an EPUB publication,
responsibilities may fall on the organization (e.g., the publisher), the individuals
preparing the publication (e.g., technical editors), or automatic procedures (e.g., as
part of a publication pipeline). As a result, not every party or process may be
responsible for ensuring every requirement is met, but there is always an EPUB creator
responsible for the conformance of the final EPUB publication.
EPUB 出版物的創建通常涉及許多人的工作,並且可能被拆分到多個組織(例如,當出版商將全部或部分工作外包時)。根據用於製作 EPUB 出版物的流程,責任可能落在組織(例如出版商)、準備出版物的個人(例如技術編輯)或自動程式(例如,作為出版物管道的一部分)上。因此,並非每一方或流程都有責任確保滿足每個要求,但總有一個 EPUB 建立者負責最終 EPUB 出版物的一致性。
Previous versions of this specification referred to the EPUB creator as the
此規範的早期版本將 EPUB 建立者稱為作者。
The section of the package document that lists the publication resources.
包文檔中列出發佈資源的部分。
Refer to 5.6.1 The manifest
element for more information.
有關詳細資訊,請參閱 5.6.1 元素 manifest
。
A specialization of the XHTML content document that contains human- and machine-readable
global navigation information. The EPUB navigation document conforms to the constraints
expressed in 7. EPUB navigation document.
XHTML 內容文件的專用化,包含人類和機器可讀的全域導航資訊。EPUB 導航文件符合 7 中表示的約束條件。EPUB 導航文件。
A logical document entity consisting of a set of interrelated resources packaged in an EPUB container.
一個邏輯文檔實體,由打包在 EPUB 容器中的一組相互關聯的資源組成。
An EPUB publication typically represents a single intellectual or artistic work, but this
specification does not restrict the nature of the content.
EPUB 出版物通常代表單一的智力或藝術作品,但此規範不限制內容的性質。
A system that processes EPUB publications for presentation to a user in a manner
conformant with this specification.
處理 EPUB 出版物以符合本規範的方式呈現給用戶的系統。
The section of the package document that defines an ordered list of EPUB content documents and foreign content documents. This list represents the default reading
order of the EPUB publication.
包文檔中定義 EPUB 內容文件和外部內容文檔的有序清單的部分。此清單表示 EPUB 出版物的預設閱讀順序。
Refer to 5.7.1 The spine
element for more information.
有關詳細資訊,請參閱 5.7.1 元素 spine
。
Exempt resources are a special class of publication resources that reading systems are
not required to support the rendering of, but EPUB creators do not have to provide fallbacks for.
豁免資源是一類特殊的出版資源,閱讀系統不需要支持呈現,但 EPUB 建立者不必為其提供後備。
Refer to 3.4 Exempt resources for more information.
有關詳細資訊,請參閱 3.4 豁免資源。
The name of any type of file within an OCF abstract container, whether a directory or a
file within a directory.
OCF 抽象容器中任何類型的檔的名稱,無論是目錄還是目錄中的檔。
The file path of a file or directory is its full path relative to the root directory, as
defined by the algorithm specified in 4.2.4 Deriving file paths.
文件或目錄的文件路徑是其相對於根目錄的完整路徑,由 4.2.4 派生文件路徑中指定的演算法定義。
An EPUB content document with fixed dimensions directly referenced from the spine. Fixed-layout documents are designated pre-paginated
in the package document, as defined in 8.2 Fixed layouts.
具有固定尺寸的 EPUB 內容文件,直接從書脊引用。固定版面文檔在包文檔中指定 pre-paginated
,如 8.2 固定版式中所定義。
Any publication resource referenced from a spine
element, or
a manifest fallback chain, that is not an EPUB content document.itemref
從主幹
元素或清單回退鏈引用的任何發佈資源,該資源不是 EPUB 內容文檔。itemref
When a foreign content document is referenced from a spine itemref
element, it
requires a manifest fallback chain with at least one EPUB content document.
當從主幹 itemref
元素引用外部內容文檔時,它需要包含至少一個 EPUB 內容文檔的清單回退鏈。
With the exception of XHTML and SVG, all core media type resources are foreign
content documents when referenced directly from the spine.
除 XHTML 和 SVG 外,所有核心媒體類型資源在直接從書脊引用時都是外來內容文檔。
A publication resource with a MIME media type [rfc2046] that does not match any of
those listed in 3.2 Core media types. Foreign resources are subject to the
fallback requirements defined in 3.3 Foreign resources.
MIME 媒體類型 [ rfc2046] 與 3.2 核心媒體類型中列出的任何媒體類型不匹配的發佈資源。外部資源受 3.3 外部資源中定義的後備要求的約束。
The designation "foreign resource" only applies to resources used in the rendering of EPUB content documents and foreign content documents.
“外部資源”名稱僅適用於用於呈現 EPUB 內容文檔和外部內容文檔的資源。
Foreign resource and foreign content document are not interchangeable terms. The types of
resources considered foreign when used in the spine is greater than the types of
resources considered foreign when used in EPUB content
documents.
“外國資源”和“外國內容”文檔是不可互換的術語。在主幹中使用時被視為外來的資源類型大於在 EPUB 內容文檔中使用時被視為外來的資源類型。
A resource that is only referenced from a package document
element (i.e., not
also used in the rendering of an EPUB publication.link
僅從包文檔
元素引用的資源(即,不用於呈現EPUB 出版物。link
Linked resources are not publication resources but may be stored in the EPUB container. They do not require fallbacks.
鏈接的資源不是發佈資源,但可以存儲在 EPUB 容器中。它們不需要回退。
An XML document that associates the XHTML content document with pre-recorded audio
narration to provide a synchronized playback experience, as defined in 9. Media overlays.
一個 XML 文件,它將 XHTML 內容文件與預先錄製的音訊旁白相關聯,以提供同步播放體驗,如 9 中所定義。媒體疊加。
Non-codec refers to content types that benefit from compression due to the nature of their
internal data structure, such as file formats based on character strings (for example, HTML,
CSS, etc.).
非編解碼器是指由於其內部數據結構的性質而受益於壓縮的內容類型,例如基於字串的檔格式(例如,HTML、CSS 等)。
The OCF abstract container defines a file system model for the contents of the OCF ZIP container, as defined in 4.2 OCF abstract container.
OCF 抽象容器為 OCF ZIP 容器的內容定義檔案系統模型,如 4.2 OCF 抽象容器中所定義。
A publication resource that describes the rendering of an EPUB publication, as
defined in 5. Package document. The package document carries meta information
about the EPUB publication, provides a manifest of resources, and defines a default reading
order.
描述 EPUB 出版物呈現的發佈資源,如 5 中所定義。包文檔。包文檔包含有關 EPUB 發佈的元資訊,提供資源清單,並定義預設讀取順序。
A resource that contains content or instructions that contribute to the logic and rendering
of an EPUB publication. In the absence of this resource, reading systems may not
render the EPUB publication as the EPUB creator intends. Examples of publication
resources include the package document, EPUB content documents, CSS Style Sheets,
audio, video, images, embedded fonts, and scripts.
包含有助於 EPUB 出版物的邏輯和呈現的內容或說明的資源。如果沒有此資源,閱讀系統可能無法按照 EPUB 建立者的意圖呈現 EPUB 出版物。發佈資源的範例包括包文件、EPUB 內容文件、CSS 樣式表、音訊、視頻、圖像、嵌入字型和腳本。
EPUB creators must list publication resources in the package document manifest and typically bundle them all in the EPUB container (the exception being they
may locate resources listed in 3.6 Resource locations outside the EPUB
container).
EPUB 建立者必須在包文檔清單中列出發佈資源,並且通常將它們全部捆綁在 EPUB 容器中(例外情況是,他們可以在 EPUB 容器之外找到 3.6 資源位置中列出的資源)。
Resources on the web identified in outbound hyperlinks (e.g., referenced from the
href
attribute of an [html] a
element) are not publication
resources.
在出站超連結中標識的 Web 資源(例如,從 [ html] a
元素 href
的屬性引用)不是發佈資源。
Data urls are also not publication resources — they are
considered part of the resource they are embedded in.
數據 URL 也不是發布資源,它們被視為嵌入到其中的資源的一部分。
A publication resource that is located outside of the EPUB container, typically, but
not necessarily, on the web.
位於 EPUB 容器外部的發佈資源,通常(但不一定)位於 Web 上。
Publication resources within the EPUB container are referred to as container resources.
EPUB 容器中的發佈資源稱為容器資源。
Refer to 3.6 Resource locations for media type specific rules for resource
locations.
請參閱 3.6 資源位置,了解資源位置的媒體類型特定規則。
The root directory represents the base of the OCF abstract container file system. This
directory is virtual in nature.
根目錄表示 OCF 抽象容器文件系統的基礎。此目錄本質上是虛擬的。
An EPUB content document that includes scripting or an XHTML content document that
contains [html] form
elements.
包含文稿的 EPUB 內容文件或包含 [ html] form
元素的 XHTML 內容文件。
Refer to 6.3.2 Scripting for more information.
有關詳細資訊,請參閱 6.3.2 腳本。
An EPUB content document that conforms to the constraints expressed in 6.2 SVG content documents.
符合 6.2 SVG 內容文件中表示的約束的 EPUB 內容文檔。
The rendering of two adjacent pages simultaneously on a device screen.
在設備螢幕上同時呈現兩個相鄰頁面。
An EPUB content document or foreign content document referenced from the spine, whether directly or via a fallback
chain.
從書脊引用的 EPUB 內容文件或外部內容文檔,無論是直接引用還是通過回退鏈引用。
The primary identifier for an EPUB publication. The unique identifier is the value of
the
element specified by the dc:identifier
unique-identifier
attribute in the package document.
EPUB 出版物的主要標識碼。唯一標識碼是包文檔中屬性 unique-identifier
指定的
元素的值。dc:identifier
Significant revision, abridgement, etc. of the content requires a new unique identifier.
對內容進行重大修訂、刪節等需要新的唯一標識符。
The region of an EPUB reading system in which an EPUB publication is rendered
visually to a user.
EPUB 閱讀系統的區域,在其中以可視方式向用戶呈現EPUB出版物。
An EPUB content document that conforms to the profile of [html] defined in 6.1 XHTML content documents.
符合 6.1 XHTML 內容文件中定義的 [ html] 設定檔的 EPUB 內容文件。
XHTML content documents use the XML syntax defined
in [html].
XHTML 內容文件使用[ html] 中定義的 XML 語法。
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
除了標記為非規範的部分外,本規範中的所有創作指南、圖表、範例和註釋都是非規範的。本規範中的其他所有內容都是規範性的。
The key words MAY, MUST, MUST NOT, OPTIONAL, RECOMMENDED, REQUIRED, SHOULD, and SHOULD NOT in this document
are to be interpreted as described in
BCP 14
[RFC2119] [RFC8174]
when, and only when, they appear in all capitals, as shown here.
本文件中的關鍵詞“可以”、“必須”、“不得”、“可選”、“推薦”、“必需”、“應該”和“不應”應按照 BCP 14 [ RFC2119] [ RFC8174] 中的描述進行解釋,當且僅當它們出現在所有大寫字母中時,如圖所示。
All algorithm explanations are non-normative.
所有演算法解釋都是非規範性的。
This section is non-normative.
本節是非規範性的。
In package document metadata examples, reserved
prefixes are used without declaration.
在包文檔元數據示例中,使用保留前綴而不聲明。
References to Dublin Core elements [dcterms] use the dc:
prefix. This prefix must be
declared in the package document for their use to be valid
(xmlns:dc="http://purl.org/dc/elements/1.1/"
)
對 Dublin Core 元素 [ dcterms] 的引用使用前 dc:
綴。必須在包文件中聲明此前綴才能使用( xmlns:dc="http://purl.org/dc/elements/1.1/"
)
The epub
namespace prefix [xml-names] is also used on elements and attributes without
always having an explicit declaration (xmlns:epub="http://www.idpf.org/2007/ops"
).
epub
命名空間前綴 [ xml-names] 也用於元素和屬性,但並不總是具有顯式聲明 ( xmlns:epub="http://www.idpf.org/2007/ops"
)。
An EPUB publication: EPUB 出版物:
MUST define at least one rendering of its content as follows:
必須定義至少一種其內容的呈現方式,如下所示:
MUST contain a package document that conforms to 5. Package document and meet all publication resource requirements for
the package document.
必須包含符合 5 的包文件。打包文檔並滿足包文檔的所有發佈資源要求。
SHOULD conform to the accessibility requirements defined in
[epub-a11y-11].
應符合 [ epub-a11y-11] 中定義的可訪問性要求。
MUST be packaged in an EPUB container as defined in 4. Open Container Format (OCF).
必須包裝在 EPUB 容器中,如 4 中定義。打開容器格式 (OCF)。
In addition, all publication resources MUST adhere to the requirements in 3. Publication resources.
此外,所有出版資源必須符合 3.出版資源。
The rest of this specification covers specific conformance details.
本規範的其餘部分涵蓋了特定的一致性詳細資訊。
This section is non-normative.
本節是非規範性的。
Due to the complexity of this specification and number of technologies used in EPUB publications,
EPUB creators are advised to use an EPUB conformance checker to verify the conformance of
their content.
由於此規範的複雜性和 EPUB 出版物中使用的技術數量,建議 EPUB 建立者使用 EPUB 一致性檢查器來驗證其內容的一致性。
EPUBCheck is the de facto EPUB conformance
checker used by the publishing industry and has been updated with each new version of EPUB. It is
integrated into a number of authoring tools and also available in alternative interfaces and other
languages (for more information, refer to its Apps and Tools
page).
EPUBCheck 是出版業使用的事實上的 EPUB 一致性檢查器,並且已隨 EPUB 的每個新版本進行了更新。它已整合到許多創作工具中,並且還提供替代介面和其他語言(有關更多資訊,請參閱其應用程式和工具頁面)。
When verifying their EPUB publications, EPUB creators should ensure they do not violate the
requirements of this specification (practices identified by the keywords "MUST", "MUST NOT", and
"REQUIRED"). These types of issues will often result in EPUB publications not rendering or rendering
in inconsistent ways. These issues are typically reported as errors or critical errors.
在驗證其 EPUB 出版物時,EPUB 建立者應確保他們不違反本規範的要求(由關鍵字“MUST”、“MUST NOT”和“REQUIRED”標識的做法)。這些類型的問題通常會導致 EPUB 出版物無法呈現或呈現方式不一致。這些問題通常報告為錯誤或嚴重錯誤。
EPUB creators should also ensure that their EPUB publications do not violate the recommendations of
this specification (practices identified by the keywords "SHOULD", "SHOULD NOT", and "RECOMMENDED").
Failure to follow these practices does not result in an invalid EPUB publication but may lead to
interoperability problems and other issues that impact the user reading experience. These issues are
typically reported as warnings.
EPUB 建立者還應確保其 EPUB 出版物不違反本規範的建議(由關鍵字“SHOULD”、“SHOULD NOT”和“RECOMMENDED”標識的做法)。不遵循這些做法不會導致 EPUB 發佈無效,但可能會導致互操作性問題和其他影響使用者閱讀體驗的問題。這些問題通常報告為警告。
Vendors, distributors, and other retailers of EPUB publications should consider the importance of
recommended practices before basing their acceptance or rejection on a zero-issue outcome from
an EPUB conformance checker. There will be legitimate reasons why EPUB creators cannot follow
recommended practices in all cases.
EPUB 出版物的供應商、分銷商和其他零售商在根據 EPUB 一致性檢查器的零問題結果接受或拒絕之前,應考慮推薦做法的重要性。EPUB 建立者在所有情況下都無法遵循推薦的做法是有正當理由的。
This section is non-normative.
本節是非規範性的。
An EPUB publication is made up of many different categories of resources, not all of which are
mutually exclusive. Some resources are publication resources, some are not. Some publication
resources are allowed in the spine by default, while all others require fallbacks.
Some resources can be used in rendering EPUB content documents, while others can only be used
with fallbacks.
EPUB 出版物由許多不同類別的資源組成,並非所有資源都是相互排斥的。有些資源是出版資源,有些則不是。默認情況下,主幹中允許某些發佈資源,而所有其他資源都需要回退。某些資源可用於呈現 EPUB 內容文件,而其他資源只能用於回退。
Trying to understand these differences by reading the technical definitions of each category of
resource can be complex. To make the categorizations easier to understand, this introduction uses
the concept of different planes to explain how resources are grouped and referred to.
試圖通過閱讀每類資源的技術定義來理解這些差異可能很複雜。為了使分類更易於理解,本簡介使用不同平面的概念來解釋如何對資源進行分組和引用。
The three planes are:
這三個平面是:
The same resource may exist on more than one plane and will be referred to differently in this
specification depending on which plane is being discussed. For example, a core media type resource
used in the rendering of an EPUB content document (on the content plane) may also be a foreign
content document if it is also listed in the spine (the spine plane).
同一資源可能存在於多個平面上,並且根據所討論的平面,在本規範中將以不同的方式引用。例如,用於呈現EPUB內容文檔(在內容平面上)的核心媒體類型資源也可能是外部內容文檔,如果它也列在主幹(主幹平面)中。
The following sections describe these planes in more detail.
以下各節將更詳細地介紹這些平面。
Refer to H.1 Resources for a detailed example showing how
resources fit into the different planes.
請參閱 H.1 資源,瞭解資源如何適應不同平面的詳細示例。
To manifest plane defines all the resources of an
EPUB publication. It is analogous to the package document manifest,
but includes resources not present in that list.
清單平面定義 EPUB 發佈的所有資源。它類似於包文檔清單,但包括該清單中不存在的資源。
The primary resources in this group are designated publication resources, which are all the
resources used in rendering an EPUB publication to the user. EPUB creators always have to
list these resources in the
element.manifest
此組中的主要資源是指定的發佈資源,這些資源是用於向用戶呈現EPUB出版物的所有資源。EPUB 建立者始終必須在
元素中列出這些資源。manifest
Publication resources are further classified by their use(s) in the spine plane and content plane.
出版資源按其在書脊平面和內容平面中的用途進一步分類。
The manifest plane also contains a set of linked resources. These resources are tangential to
the direct rendering. They include, for example, metadata records and links to external content
(e.g., where to purchase an EPUB publication).
清單平面還包含一組鏈接的資源。這些資源與直接渲染相切。例如,它們包括元數據記錄和指向外部內容的連結(例如,在哪裡購買 EPUB 出版物)。
Unlike publication resources, they are not listed in the package document manifest (i.e., because
they are not essential to rendering the EPUB publication). They are instead defined in
elements in the package document metadata. These elements define their nature and purpose
similar to how manifest link
elements define publication resource. (In this way, they are
like an extension of the manifest.)item
與發佈資源不同,它們未在包文檔清單中列出(即,因為它們對於呈現 EPUB 發佈不是必需的)。相反,它們在包文檔元數據的元素中
定義。這些元素定義其性質和用途,類似於清單 link
元素定義發佈資源的方式。(這樣,它們就像清單的擴展。item
Refer to 5.5.7 The link
element for more information about linked resources.
有關鏈接資源的更多資訊,請參閱 5.5.7 元素 link
。
Resources in the manifest plane are also sometimes broken down by where they are located.
Although most publication resources have to be located in the EPUB container (called container resources), EPUB 3 allows audio, video, font and script data
resources to be hosted outside the container. These exceptions were made to speed up the
download and loading of EPUB publications, as these resources are typically quite large, and, in
the case of fonts, not essential to the presentation. When remotely hosted, these publication
resources are referred to as remote resources.
清單平面中的資源有時也會按它們所在的位置進行細分。儘管大多數發佈資源必須位於 EPUB 容器(稱為容器資源)中,但 EPUB 3 允許將音訊、視頻、字體和腳本數據資源託管在容器外部。這些例外是為了加快EPUB出版物的下載和載入速度,因為這些資源通常非常大,而且就字體而言,對演示文稿來說不是必需的。遠端託管時,這些發佈資源稱為遠端資源。
Since linked resources are not essential to the rendering of an EPUB publication, there are no
requirements on where they are located and consequently no special naming of them based on their
location. They may be located within the EPUB container or outside it.
由於鏈接的資源對於 EPUB 出版物的呈現不是必不可少的,因此對它們的位置沒有要求,因此沒有根據它們的位置對它們進行特殊命名。它們可能位於 EPUB 容器內或容器外部。
Hyperlinked content outside the EPUB container (e.g., web pages) are not publication
resources, and consequently are not listed in the manifest. Reading systems will normally
open these links in a separate browser instance, not as part of the EPUB publication.
EPUB 容器外部的超連結內容(例如,網頁)不是發佈資源,因此不會在清單中列出。閱讀系統通常會在單獨的瀏覽器實例中打開這些連結,而不是作為 EPUB 出版物的一部分。
The spine plane defines resources used in the
default reading order established by the spine, which includes both linear and non-linear content. The spine instructs
reading systems on how to load these resources as the user progresses through the EPUB publication. Although many resources may be bundled in an EPUB container, they are not all
allowed by default in the spine.
書脊平面定義了以書脊建立的默認閱讀順序使用的資源,其中包括線性和非線性內容。主幹指示閱讀系統如何在用戶流覽 EPUB 出版物時載入這些資源。儘管許多資源可能捆綁在 EPUB 容器中,但預設情況下,它們在主幹中並未全部被允許。
EPUB 3 defines a special class of resources called EPUB content documents that EPUB creators can use in the spine without any restrictions. EPUB content documents encompass both
XHTML content documents and SVG content documents.
EPUB 3 定義了一類稱為 EPUB 內容文檔的特殊資源,EPUB 建立者可以在書脊中不受任何限制地使用這些資源。EPUB 內容文件包括 XHTML 內容文件和 SVG 內容文件。
To use any other type of resource in the spine, called a foreign content document, requires
including a fallback to an EPUB content document. This extensibility model allows EPUB creators
to experiment with formats while ensuring that reading systems are always able to render
something for the user to read, as there is no guarantee of support for foreign content
documents.
若要在主幹中使用任何其他類型的資源(稱為外部內容文檔),需要包含對 EPUB 內容文件的回退。此擴展性模型允許 EPUB 建立者試驗格式,同時確保閱讀系統始終能夠呈現供使用者閱讀的內容,因為無法保證支援外部內容文檔。
A mechanism called manifest fallbacks allows EPUB creators
to provide fallbacks for foreign content documents. In this model, the manifest entry for the foreign content document must include a fallback
attribute that points to the next
possible resource for reading systems to try when they do not support its format. Although not
common, a fallback resource can specify another fallback, thereby making chains many resources
deep. The one requirement is that there must be at least one EPUB content document in a
manifest fallback chain.
一種稱為清單回退的機制允許 EPUB 建立者為外部內容文檔提供回退。在此模型中,外部內容文檔的清單條目必須包含一個 fallback
屬性,該屬性指向下一個可能的資源,供閱讀系統在不支援其格式時嘗試。雖然不常見,但回退資源可以指定另一個回退,從而使許多資源鏈變得很深。一個要求是清單回退鏈中必須至少有一個 EPUB 內容文檔。
Although they are not directly listed in the spine, all of the resources in the fallback chain
are considered part of the spine, and by extension part of the spine plane, since any may be
used by a reading system.
儘管它們沒有直接列在脊柱中,但回退鏈中的所有資源都被視為脊柱的一部分,並且延伸到脊柱平面的一部分,因為任何資源都可以被閱讀系統使用。
Refer to 3.5.1 Manifest fallbacks for more information.
有關詳細資訊,請參閱 3.5.1 清單回退。
Although manifest fallbacks fulfill the technical requirements of
EPUB, there is little practical support for them in reading systems. Their use is strongly
discouraged as it can lead to unreadable publications.
儘管 manifest 回退滿足 EPUB 的技術要求,但在讀取系統中幾乎沒有對它們的實際支援。強烈建議不要使用它們,因為它可能導致出版物不可讀。
It is possible to provide manifest fallbacks for EPUB content documents, but this is not
required or common. For example, a scripted content document could have a fallback to an
unscripted alternative for reading systems that do not support scripting.
可以為 EPUB 內容文件提供清單回退,但這不是必需的,也不常見。例如,腳本化內容文檔可以回退到不支援腳本的讀取系統的無腳本替代項。
The content plane classifies resources that are
used when rendering EPUB content documents and foreign content documents. These types of
resources include embedded media, CSS style sheets, scripts, and fonts. These resources fall
into three categories based on their reading system support: core media type resources,
foreign resources, and exempt resources.
內容平面對呈現EPUB內容文檔和外部內容文檔時使用的資源進行分類。這些類型的資源包括嵌入式媒體、CSS 樣式表、腳本和字體。這些資源根據其閱讀系統支持分為三類:核心媒體類型資源、外部資源和豁免資源。
A core media type resource is one that reading systems have to support, so it can be used
without restriction in EPUB or foreign content documents. For more information about core media
type resources, refer to 3.2 Core media types.
核心媒體類型資源是閱讀系統必須支持的資源,因此可以在 EPUB 或外部內容文檔中不受限制地使用它。有關核心介質類型資源的詳細資訊,請參閱 3.2 核心介質類型。
Being a core media type resource does not mean that reading systems will always render the
resource, as not all reading systems support all features of EPUB 3. A reading system
without a viewport, for example, will not render visual content such as images.
作為核心媒體類型資源並不意味著閱讀系統將始終呈現資源,因為並非所有閱讀系統都支援 EPUB 3 的所有功能。例如,沒有視口的閱讀系統將無法呈現圖像等視覺內容。
The opposite of core media type resources are foreign resources. These are resources that reading
systems are not guaranteed to support the rendering of. As a result, similar to how using
foreign content documents in the spine requires fallbacks to ensure their rendering, using
foreign resources in content documents also requires fallbacks. These fallbacks are provided in
one of two ways: using the capabilities of the host format or via manifest fallbacks.
核心媒體類型資源的對立面是外部資源。這些是閱讀系統不保證支援呈現的資源。因此,與在主幹中使用外部內容文檔需要回退以確保其呈現方式類似,在內容文檔中使用外部資源也需要回退。這些回退通過以下兩種方式之一提供:使用主機格式的功能或通過清單回退。
The preferred method is to use the fallback capabilities of the host format. Many HTML elements,
for example, have intrinsic fallback capabilities. One example is the picture
element [html], which allows EPUB creators to specify multiple alternative image
formats.
首選方法是使用主機格式的回退功能。例如,許多 HTML 元素都具有固有的回退功能。一個例子是 picture
元素 [ html],它允許 EPUB 建立者指定多種替代圖像格式。
If an intrinsic fallback method is not available, it is also possible to use manifest fallbacks,
but this method, as cautioned against in the previous section,
is discouraged. For more information about foreign resources, refer to 3.3 Foreign resources.
如果內部回退方法不可用,也可以使用清單回退,但如上一節中警告的那樣,不鼓勵使用此方法。有關外部資源的更多資訊,請參閱 3.3 外部資源。
Falling between core media type resources and foreign resources are exempt resources. These are
most closely associated with foreign resources, as there is no guarantee that reading systems
will render them. But like core media types, they do not require fallbacks.
介於核心介質類型資源和外部資源之間的是免稅資源。這些與外國資源密切相關,因為不能保證閱讀系統會呈現它們。但與核心媒體類型一樣,它們不需要回退。
Exempt resources tend to address specific cases for which there are no core media types defined,
but for which providing a fallback would prove cumbersome or unnecessary. These include
embedding video, adding accessibility tracks, and linking to resources from the [html] link
element.
豁免資源傾向於解決未定義核心媒體類型的特定情況,但對於這些情況,提供回退將證明是繁瑣或不必要的。其中包括嵌入視頻、添加輔助功能軌道以及從 [ html] link
元素連結到資源。
Refer to 3.4 Exempt resources for more information about these exceptions.
有關這些例外的更多資訊,請參閱 3.4 豁免資源。
A common point of confusion arising from core media type resources is the listing of XHTML
and SVG as core media type resources with the requirement the markup conform to their
respective EPUB content document definitions. This allows EPUB creators to embed both XHTML
and SVG documents in EPUB content documents while keeping consistent requirements for
authoring and reading system support.
核心媒體類型資源引起的一個常見混淆點是將 XHTML 和 SVG 列為核心媒體類型資源,並要求標記符合其各自的 EPUB 內容文檔定義。這允許 EPUB 建立者在 EPUB 內容文件中嵌入 XHTML 和 SVG 文件,同時保持一致的創作和閱讀系統支援要求。
In practice, it means that EPUB creators can put XHTML and SVG core media type resources in
the spine without any modification or fallback (they are also conforming XHTML and SVG
content documents), but this is a unique case. All other core media type resources become
foreign content documents when used in the spine (i.e., foreign content documents include
all foreign resources and all core media type resources except for XHTML and SVG).
在實踐中,這意味著 EPUB 建立者可以將 XHTML 和 SVG 核心媒體類型資源放在書脊中,而無需任何修改或回退(他們也符合 XHTML 和 SVG 內容文檔),但這是一個獨特的案例。在主幹中使用時,所有其他核心媒體類型資源都將成為外部內容文檔(即,外部內容文檔包括除 XHTML 和 SVG 之外的所有外部資源和所有核心媒體類型資源)。
EPUB creators MAY include publication resources that conform to the MIME media type
[rfc2046] specifications defined in the following table without fallbacks when they are used in
EPUB content documents and foreign content documents. These resources are classified as
core media type resources.
EPUB 建立者可以包含符合下表中定義的 MIME 媒體類型 [ rfc2046] 規範的發佈資源,當它們在 EPUB 內容文檔和外部內容文檔中使用時,沒有回退。這些資源被歸類為核心媒體類型資源。
With the exception of XHTML content documents and SVG content documents, EPUB creators MUST
provide manifest fallbacks for core media type resources
referenced directly from the spine. In this case, they are foreign content documents.
除 XHTML 內容文件和 SVG 內容文件外,EPUB 建立者必須為直接從主幹引用的核心媒體類型資源提供清單回退。在本例中,它們是外來內容文檔。
The columns in the table represent the following information:
表中的欄示以下資訊:
Media Type—The MIME media type [rfc2046] used to represent the given
publication resource in the manifest.
媒體類型 - MIME 媒體類型 [ rfc2046] 用於表示清單中的給定發佈資源。
If the table lists more than one media type, the first one is the preferred media type. EPUB
creators should use the preferred media type for all new EPUB publications.
如果表列出了多種介質類型,則第一種介質類型是首選介質類型。EPUB 建立者應為所有新的 EPUB 出版物使用首選媒體類型。
Media Type 介質類型 | Content Type Definition 內容類型定義 | Applies to 適用於 |
---|---|---|
Images 圖像 | ||
image/gif
|
[gif] [ 動圖] | GIF Images GIF圖片 |
image/jpeg
|
[jpeg] [ jpeg格式] | JPEG Images JPEG 影像 |
image/png
|
[png] [ 巴布亞紐幾內亞] | PNG Images PNG圖片 |
image/svg+xml
|
SVG content documents SVG 內容文件 |
SVG documents SVG 文件 |
image/webp
|
[webp-container], [webp-lb] [ webp-容器], [ webp-lb] |
WebP Images WebP 圖片 |
Audio 音訊 | ||
audio/mpeg
|
[mp3] [ mp3 格式] | MP3 audio MP3 音訊 |
audio/mp4
|
[mpeg4-audio], [mp4] [ MPEG4-音訊], [ MP4] |
AAC LC audio using MP4 container 使用 MP4 容器的 AAC LC 音訊 |
audio/ogg; codecs=opus
|
[rfc7845] | OPUS audio using OGG container 使用OGG容器的OPUS音訊 |
Style 風格 | ||
text/css
|
CSS Style Sheets CSS 樣式表 |
CSS Style Sheets. CSS 樣式表。 |
Fonts 字體 | ||
|
[truetype] [ 真型態] | TrueType fonts TrueType 字體 |
|
[opentype] [ 開放類型] | OpenType fonts OpenType 字體 |
|
[woff] [ 沃夫] | WOFF fonts WOFF 字體 |
font/woff2
|
[woff2] [ 沃夫2] | WOFF2 fonts WOFF2 字體 |
Other 其他 | ||
application/xhtml+xml
|
XHTML content documents XHTML 內容文件 |
HTML documents that use the XML syntax
[html]. 使用 XML 語法 [ html] 的 HTML 文件。 |
|
[rfc4329] | Scripts. 腳本。 |
application/x-dtbncx+xml
|
[opf-201] [ OPF-201型] | The legacy NCX. 舊版 NCX。 |
application/smil+xml
|
Media overlays 媒體疊加 | EPUB media overlay documents EPUB 媒體疊加文檔 |
Inclusion as a core media type resource does not mean that all reading systems will support the
rendering of a resource. Reading system support also depends on the capabilities of the
application (e.g., a reading system with a viewport must support image core media type
resources, but a reading system without a viewport does not). Refer to Core media types [epub-rs-33] for more
information about which reading systems rendering capabilities require support for which core
media type resources.
作為核心媒體類型資源的包含並不意味著所有閱讀系統都支援資源的呈現。閱讀系統支援還取決於應用程式的功能(例如,具有視口的閱讀系統必須支援圖像核心媒體類型資源,而沒有視口的閱讀系統則不支援)。有關哪些讀取系統呈現功能需要支援哪些核心媒體類型資源的詳細資訊,請參閱核心媒體類型 [ epub-rs-33]。
The Working Group typically only includes formats as core media type resources when they have
broad support in web browser cores — the rendering engines that EPUB 3 reading systems build
upon. They are an agreement between reading system developers and EPUB creators to ensure the
predictability of rendering of EPUB publications.
工作組通常只將格式作為核心媒體類型資源包含在 Web 瀏覽器核心(EPUB 3 閱讀系統構建的渲染引擎)中具有廣泛支援時。它們是閱讀系統開發人員和 EPUB 建立者之間的協定,旨在確保 EPUB 出版物呈現的可預測性。
A foreign resource, unlike a core media type resource is one
which is not guaranteed reading system support when used in an EPUB content document or
foreign content document.
與核心媒體類型資源不同,外部資源是在 EPUB 內容文件或外部內容文檔中使用時不保證閱讀系統支援的資源。
EPUB creators MUST provide fallbacks for foreign resources, where fallbacks take
one of the following forms:
EPUB 建立者必須為外部資源提供回退,其中回退採用以下形式之一:
intrinsic fallback mechanisms provided by the host format (e.g., [html] elements often
provide the ability to reference more than one media type or to display an alternate
embedded message when a media type cannot be rendered); or
主機格式提供的內在回退機制(例如,[ HTML] 元素通常提供引用多種媒體類型或在無法呈現媒體類型時顯示備用嵌入消息的能力);或
manifest fallback chains defined on
elements
in the package document.item
在包文檔中的元素上
定義的清單回退鏈。item
Refer to the [html] and [svg] specifications for the intrinsic fallback capabilities their
elements provide.
請參閱 [ html] 和 [ svg] 規範,瞭解其元素提供的內在回退功能。
3.5.2 Intrinsic fallbacks also provides additional information about how fallbacks
are interpreted for specific elements.
3.5.2 內部回退還提供了有關如何解釋特定元素的回退的附加資訊。
An exempt resource shares properties with both foreign resources and core media type resources. It is most similar to a foreign resource in that it is not guaranteed reading system support, but, like a core media type resource, does not require a fallback.
豁免資源與外部資源和核心媒體類型資源分享屬性。它與外部資源最相似,因為它不保證讀取系統支援,但與核心媒體類型資源一樣,不需要回退。
There are only a small set of special cases for exempt resources. Video, for example, are exempt from
fallbacks because there is no consensus on a core media type video format at this time (i.e., there
is no format to fallback to). Similarly, audio and video tracks are exempt to allow EPUB creators to meet accessibility requirements using whatever format reading systems support
best.
豁免資源只有一小部分特殊情況。例如,視頻免於回退,因為目前尚未就核心媒體類型視頻格式達成共識(即,沒有可回退到的格式)。同樣,音訊和視頻軌道也被豁免,以允許 EPUB 創作者使用閱讀系統支援的最佳格式來滿足可訪問性要求。
The following list details cases of content-specific exempt resources, including any restrictions on
where EPUB creators can use them.
以下清單詳細介紹了特定於內容的豁免資源的情況,包括對 EPUB 建立者可以使用這些資源的任何限制。
All font resources not already covered as font core media types
are exempt resources.
所有尚未作為字體核心媒體類型涵蓋的字體資源都是免稅資源。
This exemption allows EPUB creators to use any font format without a fallback, regardless of
reading system support expectations, as CSS rules will ensure a fallback font in case of no
support.
此豁免允許 EPUB 建立者使用任何字體格式而無需回退,無論閱讀系統支援預期如何,因為 CSS 規則將確保在不支持的情況下使用回退字體。
Refer to the reading system support
requirements for fonts [epub-rs-33] for more information.
有關詳細資訊,請參閱字體的閱讀系統支援要求 [ epub-rs-33]。
Any resource referenced from the [html] link
element that is not already a core media type resource (e.g.,
CSS style sheets) is an exempt resource.
從 [ html] link
元素引用的任何資源(例如,CSS 樣式表)都不是核心媒體類型資源(例如,CSS 樣式表)都是豁免資源。
All audio and video tracks (e.g., [webvtt] captions, subtitles and descriptions)
referenced from the [html] track
element are exempt resources.
從 [ html] track
元素引用的所有音訊和視頻軌道(例如,[ webvtt] 字幕、字幕和描述)都是豁免資源。
All video codecs referenced from the [html] video
— including any child source
elements — are exempt resources.
從 [ html] video
引用的所有視頻編解碼器(包括任何子 source
元素)都是免稅資源。
Although reading systems are encouraged to support at least one of the H.264 [h264]
and VP8 [rfc6386] video codecs, support for video codecs is not a conformance
requirement. EPUB creators must consider factors such as breadth of adoption, playback
quality, and technology royalties when deciding which video formats to include.
儘管鼓勵讀取系統至少支援 H.264 [h264] 和 VP8 [rfc6386] 視頻編解碼器之一,但對視頻編解碼器的支援不是一致性要求。EPUB 創作者在決定包含哪些視頻格式時,必須考慮採用範圍、播放品質和技術版稅等因素。
The exemptions made above do not apply to the spine. If an exempt resource is
used in the spine, and it is not also an EPUB content document, it will require a fallback
in that context.
上述豁免不適用於脊柱。如果在主幹中使用了豁免資源,並且它不是 EPUB 內容文檔,則需要在該上下文中進行回退。
In addition to the content-specific exemptions, a resource is
classified as an exempt resource if:
除了特定於內容的豁免之外,在以下情況下,資源將被歸類為豁免資源:
it is not referenced from a spine
element (i.e., used as a foreign content document); anditemref
它不是從主幹
元素引用的(即,用作外部內容文檔);和itemref
it is not embedded directly in EPUB content documents (e.g., via [html] embedded content and [svg] image
and foreignObject
elements).
它不會直接嵌入到 EPUB 內容文件中(例如,通過 [ html] 嵌入內容和 [ svg] image
和 foreignObject
元素)。
This exemption allows EPUB creators to include resources in the EPUB container that are not for
use by EPUB reading systems. The primary case for this exemption is to allow data files to travel
with an EPUB publication, whether for scripts to use in their constituent EPUB content documents
or for external applications to use (e.g., a scientific journal might include a data set with
instructions on how to extract it from the EPUB container).
此豁免允許 EPUB 建立者在 EPUB 容器中包含不供 EPUB 讀取系統使用的資源。此豁免的主要情況是允許數據檔隨 EPUB 出版物一起傳輸,無論是用於在其組成 EPUB 內容文檔中的腳本,還是供外部應用程式使用(例如,科學期刊可能包含一個數據集,其中包含有關如何從 EPUB 容器中提取該數據集的說明)。
It also allows EPUB creators to use foreign resources in foreign content documents without reading
systems or EPUB conformance checkers having to understand the fallback capabilities of those
resources (i.e., the requirement for a fallback for the foreign content document covers any
rendering issues within it). As the resource is not referenced from an EPUB content document, it
automatically becomes exempt from fallbacks.
它還允許 EPUB 建立者在外部內容文檔中使用外部資源,而無需讀取系統或 EPUB 一致性檢查器瞭解這些資源的回退功能(即,對外部內容文檔的回退要求涵蓋其中的任何呈現問題)。由於資源不是從 EPUB 內容文件中引用的,因此它會自動免於回退。
Manifest fallbacks are a feature of the package document that create a manifest fallback chain for a publication resource, allowing reading systems
to select an alternative format they can render.
清單回退是包文檔的一項功能,它為發佈資源創建清單回退鏈,允許閱讀系統選擇它們可以呈現的替代格式。
Fallback chains are created using the fallback
attribute on manifest
elements. This attribute references
the ID [xml] of another manifest item
item
that is a
fallback for the current item
. The ordered list of all the references that a
reading system can reach, starting from a given item
's fallback
attribute, represents the full fallback chain for that item
. This chain also
represents the EPUB creator's preferred fallback order.
回退鏈是使用清單
元素上的 item
fallback
屬性創建的。此屬性引用另一個清單的 ID [ xml] item
,該清單是當前 item
.從給定 item
的 fallback
屬性開始,讀取系統可以訪問的所有引用的有序清單表示該 item
引用的完整回退鏈。此鏈還表示 EPUB 建立者的首選回退順序。
There are two cases for manifest fallbacks:
清單回退有兩種情況:
EPUB creators MUST specify a fallback chain for a foreign content document to ensure
that reading systems can always render the spine item. In this case,
the chain MUST contain at least one EPUB content document.
EPUB 建立者必須為外部內容文檔指定回退鏈,以確保閱讀系統始終可以呈現主幹專案。在這種情況下,鏈必須包含至少一個 EPUB 內容文件。
EPUB creators MAY provide fallbacks for EPUB content documents (e.g., to provide a fallback for scripted content).
EPUB 建立者可以為 EPUB 內容文件提供回退(例如,為腳本內容提供回退)。
When a fallback chain includes more than one EPUB content document, EPUB creators can use
the properties
attribute to differentiate
the purpose of each.
當回退鏈包含多個 EPUB 內容文件時,EPUB 建立者可以使用該 properties
屬性來區分每個文檔的用途。
The original purpose for content fallbacks was to specify fallback images for the
[html] img
element. As HTML now has intrinsic fallback mechanism for images,
the use of content fallbacks is strongly discouraged. EPUB creators should always
use the intrinsic fallback capabilities of [html] and [svg] to provide fallback
content.
內容回退的最初目的是為 [ html] img
元素指定回退圖像。由於 HTML 現在具有圖像的內在回退機制,因此強烈建議不要使用內容回退。EPUB 建立者應始終使用 [ html] 和 [ svg] 的固有回退功能來提供回退內容。
EPUB creators MUST provide a content fallback for foreign resources when the elements
that reference them do not have intrinsic fallback capabilities. In this case, the
fallback chain MUST contain at least one core media type resource.
當引用 EPUB 的元素不具有內在回退功能時,EPUB 建立者必須為外部資源提供內容回退。在這種情況下,回退鏈必須包含至少一個核心媒體類型資源。
EPUB creators MAY also provide manifest fallbacks for core media type resources (e.g., to
allow reading systems to select from more than one image format).
EPUB 建立者還可以為核心媒體類型資源提供清單回退(例如,允許閱讀系統從多種圖像格式中進行選擇)。
Regardless of the type of manifest fallback specified, fallback chains MUST NOT contain
self-references or circular references to item
elements in the chain.
無論指定的清單回退類型如何,回退鏈都不得包含對 item
鏈中元素的自引用或迴圈引用。
As it is not possible to use manifest fallbacks for resources represented in data URLs, EPUB creators can only represent foreign resources
as data URLs where an intrinsic fallback mechanism is available.
由於無法對數據 URL 中表示的資源使用清單回退,因此 EPUB 建立者只能將外部資源表示為具有內在回退機制的數據 URL。
The following sections provide additional clarifications about the intrinsic fallback
requirements of specific elements.
以下各節提供了有關特定元素的內在回退要求的其他說明。
EPUB creators MUST NOT use embedded
[html] flow content within a media
element (i.e, audio
or video
) as an intrinsic fallback for
audio foreign resources. Only child source
elements [html] provide intrinsic
fallback capabilities.
EPUB 建立者不得使用媒體元素( audio
即 或 video
)中嵌入的 [ html] 流內容作為音訊外部資源的內在回退。只有子 source
元素 [ html] 提供內在的回退功能。
Only older reading systems that do not recognize the audio
or the
video
elements (e.g., EPUB 2 reading systems) will render the embedded
content. When reading systems support these elements but not the available media formats,
they do not render the embedded content for the user.
只有無法識別 audio
或 元素 video
的舊閱讀系統(例如 EPUB 2 閱讀系統)才會呈現嵌入的內容。當閱讀系統支援這些元素但不支援可用的媒體格式時,它們不會為使用者呈現嵌入的內容。
The requirement for fallbacks only applies to audio foreign resources referenced from
audio
and video
elements. Fallbacks are not required for
video resources; they are exempt resources.
回退要求僅適用於引用自 audio
和 video
元素的音訊外部資源。視頻資源不需要回退;它們是豁免資源。
Due to the variety of sources that EPUB creators
can specify in the [html] img
element, the following fallback conditions apply to its
use:
由於 EPUB 建立者可以在 [ html] img
元素中指定各種源,因此以下回退條件適用於其使用:
If it is the child of a picture
element:
如果它是 picture
元素的子元素:
src
and
srcset
attributes, when EPUB creators specify those attributes;
andsrc
和 srcset
屬性中引用核心媒體類型資源;和source
element MUST reference a core media type resource
from its src
and srcset
attributes unless it specifies the MIME media type [rfc2046] of a foreign resource in its type
attribute.source
元素都必須從其 src
and srcset
屬性引用核心媒體類型資源,除非它在其 type
屬性中指定了外部資源的 MIME 媒體類型 [ rfc2046]。src
and
srcset
attributes provided EPUB creators define a manifest fallback.src
和 srcset
屬性中引用外部資源。Although data blocks have a separate MIME media type [rfc2046] from their containing
XHTML content document, it is not possible to provide intrinsic fallbacks as no such
mechanisms are specified for the [html] script
element. It is also not possible to
provide manifest fallbacks because data blocks cannot be defined as standalone files in the
EPUB container but are always embedded as inline script
elements.
儘管數據塊具有與其包含的 XHTML 內容文檔不同的 MIME 媒體類型 [ rfc2046],但無法提供內部回退,因為沒有為 [ html] script
元素指定此類機制。也無法提供清單回退,因為數據塊不能定義為 EPUB 容器中的獨立檔,而是始終作為內聯 script
元素嵌入。
But, as the script
element does not represent user content — data blocks are not rendered unless manipulated by
script, and content rendered by scripts already has core
media type requirements — requiring fallbacks for the raw data does not serve a
useful purpose.
但是,由於 script
元素不表示用戶內容(除非由腳本操作,否則不會呈現數據塊,並且腳本呈現的內容已經具有核心媒體類型要求),因此要求對原始數據進行回退並不能起到有用的作用。
Consequently, to ensure that EPUB creators can include data blocks for scripting
purposes, they are exempt from fallback requirements.
因此,為了確保 EPUB 建立者可以包含用於腳本目的的數據塊,他們不受回退要求的約束。
This exemption aligns data blocks with the exemption for data files.
此豁免使數據塊與數據檔的豁免保持一致。
[svg] does not define data blocks as of publication, but the same exclusion would apply
if a future update adds the concept.
[ svg] 在發佈時未定義數據塊,但如果將來的更新添加了該概念,則相同的排除將適用。
EPUB creators MAY host the following types of publication resources outside the EPUB container:
EPUB 建立者可以在 EPUB 容器之外託管以下類型的發佈資源:
Audio resources. 音訊資源。
Video resources. 視頻資源。
Resources retrieved via scripting APIs (e.g.,
XmlHttpRequest [xhr] and Fetch [fetch]).
通過腳本 API(例如 XmlHttpRequest [ xhr] 和 Fetch [ fetch])檢索的資源。
Font resources. 字體資源。
EPUB creators MUST store all other resources within the EPUB container.
EPUB 建立者必須將所有其他資源存儲在 EPUB 容器中。
Storing all resources inside the EPUB container is strongly encouraged whenever possible as it allows
users access to the entire presentation regardless of connectivity status.
強烈建議盡可能將所有資源存儲在 EPUB 容器中,因為它允許使用者訪問整個演示文稿,而不管連接狀態如何。
When resources have to be located outside the EPUB container, EPUB creators are RECOMMENDED to
reference them via the secure https
URI scheme [rfc7230] to limit the threat of
exposing their publications, and users, to network attacks. Reading systems might not load
remote resources referenced using insecure schemes such as http
.
當資源必須位於 EPUB 容器外部時,建議 EPUB 建立者通過安全 https
URI 方案 [rfc7230] 引用它們,以限制將其發佈和使用者暴露於網路攻擊的威脅。讀取系統可能不會載入使用不安全機制(如 http
.
These rules for locating publication resource apply regardless of whether the given resource is a
core media type resource or a foreign resource.
無論給定資源是核心媒體類型資源還是外部資源,這些用於查找發佈資源的規則都適用。
Refer to the remote-resources
property for more
information on how to indicate that a manifest
references a
remote resource.item
有關如何指示清單
引用遠端資源的詳細資訊,請參閱該 item
remote-resources
屬性。
The data:
URL scheme [rfc2397] is used to encode resources
directly into a URL string. The advantage of this scheme is that it allows EPUB creators to
embed a resource within another, avoiding the need for an external file.
data:
URL 方案 [ rfc2397] 用於將資源直接編碼為 URL 字串。此方案的優點是它允許 EPUB 建立者將資源嵌入到另一個資源中,從而避免了對外部檔的需求。
EPUB creators MUST NOT use data URLs in the following scenarios where they can result in a
top-level content document or top-level browsing context [html]:
EPUB 建立者不得在以下情況下使用數據 URL,因為數據 URL 可能會導致頂級內容文檔或頂級流覽上下文 [ html]:
in href
attributes in the package document — this applies both to manifest
elements and metadata item
elements;link
在包文檔中的屬性中 href
— 這既適用於清單
元素,也適用於元數據 item
元素;link
in the href
attribute on [html] or [svg] a
elements, except
when inside an iframe
element [html];
在 [ html] 或 [ svg] a
元素的 href
屬性中,除非在 iframe
元素 [ html] 內;
in the href
attribute on [html] area
elements, except when inside
an iframe
element;
在 [ html] area
元素的 href
屬性中,除非在 iframe
元素內;
in calls to [ecmascript] window.open
or document.open
.
在對 [ ecmascript] window.open
或 document.open
.
These restrictions on the use of data URLs are to prevent security issues and also to ensure that
reading systems can determine where to take a user next (i.e., because data URLs cannot be
referenced from the spine).
這些對數據 URL 使用的限制是為了防止安全問題,也是為了確保讀取系統可以確定使用者下一步要去哪裡(即,因為無法從主幹引用數據 URL)。
The list of prohibited uses for data URLs is subject to change as the respective standards that
allow their use evolve.
數據 URL 的禁止使用清單可能會隨著允許其使用的相應標準的發展而更改。
A consequence of embedding is that the data in a data URL is not considered its own unique
publication resource for manifest reporting purposes (i.e., only its containing publication
resource gets listed). As this data has its own media type, however, it is still subject to foreign resource restrictions. EPUB creators MUST therefore
encode data URLs as core media type resources or provide a fallback using the intrinsic fallback
mechanisms of the host format.
嵌入的後果是,出於清單報告目的,數據 URL 中的數據不被視為其自己的唯一發佈資源(即,僅列出其包含的發佈資源)。但是,由於此數據具有自己的媒體類型,因此仍受外部資源限制。因此,EPUB 建立者必須將數據 URL 編碼為核心媒體類型資源,或者使用主機格式的固有回退機制提供回退。
The file:
URL scheme is defined in [rfc8089] as
"identifying an object (a 'file') stored in a structured object naming and accessing environment on
a host (a 'file system')." It is typically used to retrieve files from the local operating
system.
file:
URL 方案在 [ rfc8089] 中定義為“標識存儲在主機('文件系統')上的結構化物件命名和訪問環境中的物件('檔')。它通常用於從本地作業系統檢索檔。
Using a file URL in an EPUB publication, which can be transferred among different hosts,
represents a security risk and is also non-interoperable. As a consequence, EPUB creators MUST NOT use file URLs in EPUB publications.
在 EPUB 發佈中使用可在不同主機之間傳輸的檔 URL 存在安全風險,並且不可互操作。因此,EPUB 建立者不得在 EPUB 出版物中使用檔 URL。
Any publication resource that is an XML-based media type [rfc2046]:
任何基於 XML 的媒體類型的發佈資源 [ rfc2046]:
MUST be a conformant XML 1.0 Document as defined in Conformance of Documents [xml-names].
必須是符合 XML 1.0 的文件,如文檔一致性 [ xml-names] 中所定義。
MAY only specify a document type
declaration that references an external
identifier appropriate for its media type — as defined in B. Allowed external identifiers — or that omits external identifiers [xml].
只能指定引用適合其媒體類型的外部識別碼(如 B. 允許的外部識別碼中所定義)或省略外部識別碼 [ xml] 的文件類型聲明。
MUST NOT contain external entity
declarations in the internal DTD subset [xml].
不得在內部 DTD 子集 [ xml 中包含外部實體聲明。
MUST NOT make use of XInclude [xinclude].
不得使用 XInclude [ xinclude]。
MUST be encoded in UTF-8 or UTF-16 [unicode], with UTF-8 as the
RECOMMENDED encoding.
必須以UTF-8或UTF-16 [unicode] 編碼,其中UTF-8作為推薦編碼。
The above constraints apply regardless of whether the given publication resource is a core media type resource or a foreign resource.
無論給定的發佈資源是核心媒體類型資源還是外部資源,上述約束都適用。
This section is non-normative.
本節是非規範性的。
OCF is the required container technology for EPUB publications. OCF may play a role in the
following workflows:
OCF 是 EPUB 出版物所需的容器技術。OCF 可能在以下工作流程中發揮作用:
This section defines the rules for structuring the file collection in the abstract: the "abstract
container". It also defines the rules for the representation of this abstract container within a ZIP
archive: the "physical container". The rules for ZIP physical containers build upon the ZIP
technologies used by [odf].
本節定義了在抽象中構建檔集合的規則:“抽象容器”。它還定義了在ZIP存檔中表示此抽象容器的規則:「物理容器」。ZIP 物理容器的規則建立在 [ odf] 使用的 ZIP 技術之上。
OCF also defines a standard method for obfuscating embedded fonts
for those EPUB publications that require this functionality.
OCF 還定義了一種標準方法,用於對需要此功能的 EPUB 出版物的嵌入字體進行模糊處理。
This section is non-normative.
本節是非規範性的。
The OCF abstract container file system model uses a single common root directory. All
container resources are located within the directory tree headed by the root directory, but
no specific file system structure for them is mandated by this specification.
OCF 抽象容器文件系統模型使用單個公共根目錄。所有容器資源都位於以根目錄為首的目錄樹中,但此規範沒有強制要求它們具有特定的檔系統結構。
The file system model also includes a mandatory directory named META-INF
that is a
direct child of the root directory and stores the following special files:
檔案系統模型還包括一個名為 META-INF
root 目錄的直接子目錄的必需目錄,並儲存以下特殊檔:
container.xml
[required]
Identifies one or more package documents that define the EPUB publication.
標識定義 EPUB 發佈的一個或多個包文檔。
signatures.xml
[optional]
Contains digital signatures for various assets.
包含各種資產的數字簽名。
encryption.xml
[optional]
Contains information about the encryption of publication resources. This file is
mandatory when EPUB creators use font
obfuscation.
包含有關發佈資源加密的資訊。當 EPUB 建立者使用字體混淆時,此檔是必需的。
metadata.xml
[optional]
Used to store metadata about the OCF ZIP container.
用於存儲有關OCF ZIP容器的元數據。
rights.xml
[optional]
Used to store information about digital rights.
用於存儲有關數位版權的資訊。
manifest.xml
[optional]
A manifest of container contents as allowed by Open Document Format [odf].
打開文件格式 [ odf] 允許的容器內容清單。
Refer to 4.2.6 META-INF
directory for conformance requirements for the various files
in the META-INF
directory.
請參閱 4.2.6 META-INF
目錄,了解 META-INF
目錄中各種檔的一致性要求。
The virtual file system for the OCF abstract container MUST have a single common root directory for all the contents of the container.
OCF 抽象容器的虛擬文件系統必須具有容器所有內容的單個公共根目錄。
The OCF abstract container MUST include a directory for configuration files named
META-INF
that is a direct child of the container's root directory. Refer to 4.2.6 META-INF
directory for the requirements for the contents of this
directory.
OCF 抽象容器必須包含一個名為 META-INF
容器根目錄的直接子目錄的配置文件目錄。有關此目錄內容的要求,請參閱 4.2.6 META-INF
目錄。
The file name mimetype
in the root directory is reserved for use by OCF ZIP containers, as explained in 4.3 OCF ZIP container.
根目錄中的檔名 mimetype
保留供 OCF ZIP 容器使用,如 4.3 OCF ZIP 容器中所述。
Files in the META-INF
directory and the mimetype
file are not
publication resources so MUST NOT be listed in the manifest.
META-INF
目錄中的文件和 mimetype
檔不是發佈資源,因此不得在清單中列出。
EPUB creators MAY locate all other files within the OCF abstract container in any location
descendant from the root directory, provided they are not within the META-INF
directory. EPUB creators MUST NOT reference files in the META-INF
directory from an
EPUB publication.
EPUB 建立者可以在根目錄的任何位置找到 OCF 抽象容器中的所有其他檔,前提是它們不在目錄中 META-INF
。EPUB 建立者不得引用 EPUB 出版物目錄 META-INF
中的檔。
Some reading systems do not provide access to resources outside the directory where the
package document is stored. EPUB creators should therefore place all resources at or
below the directory containing the package document to avoid interoperability issues.
某些讀取系統不提供對存儲包文檔的目錄之外的資源的訪問。因此,EPUB 建立者應將所有資源放在包含包文檔的目錄或目錄下方,以避免互操作性問題。
This problem is more commonly encountered when creating multiple renditions [epub-multi-rend-11] of the publication.
在創建出版物的多個演繹版 [ epub-multi-rend-11] 時,更常遇到此問題。
In the context of the OCF abstract container, file paths and file names are scalar value strings [infra] (i.e., their values are case sensitive).
在 OCF 抽象容器的上下文中,檔路徑和檔名是標量值字串 [ infra](即,它們的值區分大小寫)。
In addition, the following restrictions are designed to allow file paths and file names to be
used without modification on most operating systems:
此外,以下限制旨在允許在大多數作業系統上使用檔路徑和檔名而無需修改:
File names MUST NOT exceed 255 bytes.
檔名不得超過 255 個字節。
The file paths for any directory or file within the OCF abstract
container MUST NOT exceed 65535 bytes.
OCF 抽象容器中任何目錄或文件的檔路徑不得超過65535位元組。
File names MUST NOT use the following [unicode] characters, as
commonly used operating systems may not support these characters consistently:
檔名不得使用以下 [ unicode] 字元,因為常用的作業系統可能無法一致地支持這些字元:
SOLIDUS: /
(U+002F
)
固相線: /
( U+002F
)
QUOTATION MARK: "
(U+0022
)
引號: "
( U+0022
)
ASTERISK: *
(U+002A
)
ASTERISK: *
( U+002A
)
FULL STOP as the last character: .
(U+002E
)
最後一個字元為句號: .
( U+002E
)
COLON: :
(U+003A
)
冒號: :
( U+003A
)
LESS-THAN SIGN: <
(U+003C
)
小於號: <
( U+003C
)
GREATER-THAN SIGN: >
(U+003E
)
大於符號: >
( U+003E
)
QUESTION MARK: ?
(U+003F
)
問號: ?
( U+003F
)
REVERSE SOLIDUS: \
(U+005C
)
反向固相線: \
( U+005C
)
VERTICAL LINE: |
(U+007C
)
垂直線: |
( U+007C
)
DEL (U+007F
) 德爾 ( U+007F
)
C0 range (U+0000 … U+001F
)
C0 範圍 ( U+0000 … U+001F
)
C1 range (U+0080 … U+009F
)
C1 範圍 ( U+0080 … U+009F
)
Private Use Area (U+E000 … U+F8FF
)
私人使用區 ( U+E000 … U+F8FF
)
All Unicode Non Characters, specifically:
所有 Unicode 非字元,特別是:
The 32 contiguous characters in the Basic Multilingual Plane
(U+FDD0 … U+FDEF
)
基本多語言平面 ( U+FDD0 … U+FDEF
) 中的 32 個連續字元
The last two code points of the Basic Multilingual Plane
(U+FFFE
and U+FFFF
)
基本多語言平面的最後兩個代碼點 ( U+FFFE
和 U+FFFF
)
The last two code points at the end of the Supplementary Planes
(U+1FFFE, U+1FFFF … U+EFFFE, U+EFFFF
)
補充平面末尾的最後兩個碼位 ( U+1FFFE, U+1FFFF … U+EFFFE, U+EFFFF
)
Specials (U+FFF0 … U+FFFF
) 特價商品 ( U+FFF0 … U+FFFF
)
Supplementary Private Use Area-A (U+F0000 … U+FFFFF
)
補充私人使用區-A ( U+F0000 … U+FFFFF
)
Supplementary Private Use Area-B (U+100000 … U+10FFFF
)
補充私人使用區-B ( U+100000 … U+10FFFF
)
The Unicode Character Database [uax44] also includes a list of
deprecated characters. EPUB creators are advised to avoid these characters,
as well, as it is expected that EPUB conformance checkers will flag their
use.
Unicode 字元資料庫 [ uax44] 還包括已棄用字元的清單。建議 EPUB 建立者也避免使用這些字元,因為預計 EPUB 一致性檢查器會標記它們的使用。
For compatibility with older reading systems, file names SHOULD NOT
contain SPACE (U+0020) characters.
為了與較舊的讀取系統相容,檔名不應包含空格 (U+0020) 字元。
All file names within the same directory MUST be unique following Unicode
canonical normalization [uax15] and then full case folding [unicode]. (Refer to Unicode Canonical Case Fold
Normalization Step [charmod-norm] for more information.)
同一目錄中的所有檔名必須是唯一的,遵循 Unicode 規範化 [uax15],然後全寫摺疊 [unicode]。(有關詳細資訊,請參閱 Unicode 規範大小寫摺疊規範化步驟 [charmod-norm]。
If EPUB creators dynamically integrate resources (i.e., where the naming is beyond their
control), they should be aware that automatic truncation of file names to keep them within
the 255 bytes limit can lead to corruption. This is due to the difference between bytes and
characters in multibyte encodings such as UTF-8; it is, therefore, important to avoid
mid-character truncation. See the section on "Truncating or limiting the length of
strings" in [international-specs] for more information.
如果 EPUB 建立者動態整合資源(即,命名超出其控制範圍),他們應該意識到自動截斷檔名以使其保持在 255 位元組限制內可能會導致損壞。這是由於多位元組編碼(如UTF-8)中的位元組和字元之間的差異;因此,避免中間字元截斷非常重要。有關詳細資訊,請參閱 [ international-specs] 中有關“截斷或限制字符串長度”的部分。
EPUB creators should use an abundance of caution in their file naming when interoperability
of content is key. The list of restricted characters is intended
to help avoid some known problem areas, but it does not ensure that all other Unicode
characters are supported. Although Unicode support is much better now than in earlier
iterations of EPUB, older tools and toolchains may still be encountered (e.g., ZIP tools
that only support [us-ascii]).
當內容的互操作性是關鍵時,EPUB 建立者在檔命名時應非常謹慎。受限制字元清單旨在説明避免某些已知問題區域,但不能確保支援所有其他 Unicode 字元。儘管現在對 Unicode 的支援比 EPUB 的早期反覆運算要好得多,但仍可能遇到較舊的工具和工具鏈(例如,僅支援 [us-ascii] 的 ZIP 工具)。
To derive the file path, given a file or directory file in the OCF abstract container, apply the following steps
(expressed using the terminology of [infra]):
要派生文件路徑,給定 OCF 抽象容器中的文件或目錄檔,請應用以下步驟(使用 [ infra] 的術語表示):
U+002F (/)
character.U+002F (/)
字元返回路徑的串聯。The container root URL is the URL [url] of the root directory. It is implementation-specific, but
EPUB creators MUST assume it has the following properties:
容器根 URL 是根目錄的 URL [ url]。它是特定於實現的,但 EPUB 建立者必須假定它具有以下屬性:
/
" with the container root URL as base is the container root URL./
的結果是容器根 URL。..
" with the container root URL as base is the container root URL...
的結果是容器根 URL。The content URL of a file or directory in the OCF abstract container is the result of
parsing the file's file path with the container root URL as base.
OCF 抽象容器中檔或目錄的內容 URL 是以容器根 URL 為基檔路徑解析檔路徑的結果。
The container root URL is the URL assigned by the reading system to the root of the
EPUB container. It typically depends on how the reading system internally implements the
container file system.
容器根 URL 是讀取系統分配給 EPUB 容器根目錄的 URL。這通常取決於讀取系統如何在內部實現容器文件系統。
However, a reading system cannot arbitrarily use any URL, but one that honors the constraints
defined above. These constraints ensure that any relative URL string found in the EPUB will
always be parsed to a URL of a resource within the container (which may or may not exist).
The primary reason for these constraints is to avoid potential run-time security issues that
would be caused by parsed URLs "leaking" outside the container files.
但是,讀取系統不能任意使用任何 URL,而只能使用遵循上述約束的 URL。這些約束可確保在 EPUB 中找到的任何相對 URL 字串將始終分析為容器中資源的 URL(可能存在也可能不存在)。這些約束的主要原因是避免潛在的運行時安全問題,這些問題是由分析的 URL 在容器檔外部「洩漏」引起的。
For example, URLs like https://localhost:12345/
or
https://www.example.org:12345/
honor these properties. But URLs like
https://localhost:12345/path/to.epub/
,
file:///path/to.epub#path=/
, or jar:file:/path/to.epub!/EPUB/
do not (parsing the URL string "..
" with these three examples as base would
return https://localhost:12345/path/
, file:///path/
, and a parsing
error, respectively). It is the responsibility of the reading system to assign a URL to the
root directory that complies with the properties defined above.
例如,URL 喜歡 https://localhost:12345/
或 https://www.example.org:12345/
支援這些屬性。但是像、 或 不這樣的 https://localhost:12345/path/to.epub/
URL(以這三個範例為基礎解析 URL 字串 ' ..
“ 將分別傳回 https://localhost:12345/path/
、 file:///path/
和解析 jar:file:/path/to.epub!/EPUB/
錯誤)。 file:///path/to.epub#path=/
讀取系統負責為根目錄分配符合上述定義屬性的 URL。
Parsing may replace some characters in the file path by their percent encoded alternative. For example,
A/B/C/file name.xhtml
becomes A/B/C/file%20name.xhtml
.
解析可能會將文件路徑中的某些字元替換為其百分比編碼的替代字元。例如, A/B/C/file name.xhtml
變為 A/B/C/file%20name.xhtml
.
A string url is a valid-relative-ocf-URL-with-fragment string if it is a
path-relative-scheme-less-url string, optionally followed by U+0023 (#)
and a url-fragment string, and if the following steps return true:
如果字串 url 是 path-relative-scheme-less-url 字串,則該字串是 valid-relative-ocf-URL-with-fragment 字符串,可以選擇後跟 U+0023 (#)
和 url-fragment 字符串,並且如果以下步驟返回 true:
Set the container root URL to https://a.example.org/A/
.
將容器根 URL 設定為 https://a.example.org/A/
。
The goal of the algorithm is to detect whether url could be seen as
"leaking" outside the container. To do that, the standard URL parsing algorithm is used with an artificial root URL; the detection of the "leak" is done
by comparing the result of the parsing with the presence of the first test path
segment (A
). (Note that the artificial container root URL wilfully
violates, for the purpose of this algorithm, the required properties by using that first test path segment.)
Let base be the base URL that must be
used to parse url as defined by the context (document or environment) where
url is used, and according to the content URL of the package document
(see 5.2 Parsing URLs in the package document).
設base為必須用於解析 url 的基 URL,該 URL 由使用 url 的上下文(文檔或環境)定義,並根據包文檔的內容 URL(參見 5.2 解析包文檔中的 URL)。
In the case of a URL in the package document the base variable is set to
the content URL of the package document. In the case of a document within the
META-INF
directory, the base variable is set to the
container root URL (see 4.2.6.2 Parsing URLs in the META-INF
directory). In the case of a
URL in an XHTML content document, the base URL used for parsing is defined by
the HTML standard. Typically, it will be the
content URL of the content document (unless the discouraged
base
element is used).
Set the container root URL to https://b.example.org/B/
.
將容器根 URL 設定為 https://b.example.org/B/
。
The reasons to repeat the same steps twice with different, and artificial, settings
of the container root URL is to avoid collision which may occur if the
url string also includes /A/
. Consider, for example, the
case where url is ../../A/doc.xhtml
.
If testURLStringA does not start with https://a.example.org/
or
testURLStringB does not start with https://b.example.org/
,
return true.
如果 testURLStringA 不以 開頭 https://a.example.org/
,或者 testURLStringB 不以 https://b.example.org/
開頭,則返回 true。
If any of the result does not share the test URL host, it means that url,
or its base URL (for example, in HTML, if it is explicitly set with the
base
element), was absolute and points outside the
container. This is acceptable.
If testURLStringA starts with https://a.example.org/A/
and
testURLStringB starts with https://b.example.org/B/
, return
true.
如果 testURLStringA 以 開頭 https://a.example.org/A/
,而 testURLStringB 以 https://b.example.org/B/
開頭,則返回 true。
The presence of the first test path segments (A
, respectively
B
) indicate that the URL doesn't leak outside the container.
In the OCF abstract container, any URL string MUST be an
absolute-url-with-fragment string or a valid-relative-ocf-URL-with-fragment string.
在 OCF 抽象容器中,任何 URL 字串都必須是 absolute-url-with-fragment 字串或 valid-relative-ocf-URL-with-fragment 字符串。
In addition, all relative-URL-with-fragment strings [url] MUST, after parsing, be equal to the content URL of an existing file in the OCF
abstract container.
此外,所有 relative-URL-with-fragment 字串 [ url] 在解析後必須等於 OCF 抽象容器中現有檔的內容 URL。
These constraints on URL strings mean that:
這些對 URL 字串的約束意味著:
/
(U+002F
) (for example,
/EPUB/content.xhtml
) are disallowed; /
( U+002F
) 開頭的相對 URL 字串(例如 /EPUB/content.xhtml
);EPUB/../../../../config.xml
) are
disallowed; EPUB/../../../../config.xml
);Note that in any case, even the disallowed URL strings described above will not "leak"
outside the container after parsing (as explained in the first note of this section). They are nevertheless disallowed for better
interoperability with non-conforming or legacy reading systems and toolchains.
請注意,在任何情況下,即使是上述不允許的 URL 字串也不會在解析后「洩漏」到容器外部(如本節的第一個註釋中所述)。然而,為了與不合規或遺留的閱讀系統和工具鏈有更好的互操作性,它們被禁止使用。
All OCF abstract containers MUST include a directory called META-INF
in
their root directory.
所有OCF抽象容器都必須包含在其根目錄中調用 META-INF
的目錄。
This directory is reserved for configuration files, specifically those defined in 4.2.6.3 Reserved files.
此目錄是為配置檔保留的,特別是 4.2.6.3 保留檔中定義的檔。
To parse a URL string
url used in files located in the META-INF
directory the URL parser MUST be applied to url, with the
container root URL as base.
若要分析位於 META-INF
目錄中的檔中使用的URL字串url,必須將URL解析器應用於url,並將容器根URL作為基礎。
The REQUIRED container.xml
file in the META-INF
directory
identifies the package documents available in the OCF abstract container.
META-INF
目錄中的 REQUIRED container.xml
檔標識 OCF 抽象容器中可用的包文檔。
All [xml] elements defined in this section are in the
urn:oasis:names:tc:opendocument:xmlns:container
namespace [xml-names]
unless specified otherwise.
除非另有說明,否則本節中定義的所有 [ xml] 元素都位於 urn:oasis:names:tc:opendocument:xmlns:container
命名空間 [ xml-names] 中。
The contents of this file MUST be valid to the definition in this section after removing
all elements and attributes from other namespaces (including all attributes and contents
of such elements).
從其他命名空間中刪除所有元素和屬性(包括此類元素的所有屬性和內容)后,此文件的內容必須對本節中的定義有效。
An XML Schema also informally defines
the content of this file.
XML 架構還非正式地定義此文件的內容。
The container
element encapsulates all the information in the
container.xml
file.
該 container
元素封裝 container.xml
檔中的所有資訊。
container
REQUIRED root element [xml] of the
container.xml
file.
container.xml
檔的 REQUIRED 根元素 [ xml]。
version
[required]
1.0
".1.0
”In this order: 依此順序:
The rootfiles
element contains a list of package documents available
in the EPUB container.
該 rootfiles
元素包含EPUB容器中可用的包文檔清單。
Each rootfile
element identifies the location of one package document in the EPUB container.
每個 rootfile
元素標識一個包文檔在 EPUB 容器中的位置。
rootfile
As child of the
element. Repeatable.rootfiles
作為
元素的子元素。重複。rootfiles
full-path
[required]
Identifies the location of a package document.
標識包文檔的位置。
The value of the attribute MUST be a path-relative-scheme-less-URL string [url]. The path is relative to the root directory.
屬性的值必須是 path-relative-scheme-less-URL 字符串 [ url]。路徑相對於根目錄。
media-type
[required]
Identifies the media type of the package document.
標識包文檔的介質類型。
The value of the attribute MUST be
"application/oebps-package+xml
".
屬性的值必須是 “ application/oebps-package+xml
” ”
Empty 空
If an EPUB creator defines more than one rootfile
element, each MUST
reference a package document that conforms to the same version of EPUB. Each package
document represents one rendering of the EPUB publication.
如果 EPUB 建立者定義了多個 rootfile
元素,則每個元素都必須引用符合相同版本的 EPUB 的包文檔。每個包文檔表示 EPUB 出版物的一個呈現形式。
Although the EPUB container provides the ability to reference more than one
package document, this specification does not define how to interpret, or select
from, the available options. Refer to [epub-multi-rend-11] for more
information on how to bundle more than one rendering of the content.
儘管 EPUB 容器提供了引用多個包文檔的功能,但此規範並未定義如何解釋可用選項或從中進行選擇。請參閱 [ epub-multi-rend-11] 以獲取有關如何捆綁多個內容呈現的更多資訊。
The links
element identifies resources
necessary for the processing of the OCF ZIP container.
該 links
元素標識處理 OCF ZIP 容器所需的資源。
links
OPTIONAL second child of
. Repeatable.container
的可選第二個子項
。重複。container
None 沒有
link
[1 or more] link
[1個以上]This specification currently does not define uses for the links
element. Refer to [epub-multi-rend-11] for an example of its use.
此規範當前未定義 links
元素的用途。有關其使用示例,請參閱 [ epub-multi-rend-11]。
link
As child of the
element. Repeatable.links
作為
元素的子元素。重複。links
href
[required]
Identifies the location of a resource.
標識資源的位置。
The value of the link
element href
attribute MUST be a path-relative-scheme-less-URL string
[url]. The path is relative to the root directory.
link
element href
屬性的值必須是 path-relative-scheme-less-URL 字串 [ url]。路徑相對於根目錄。
media-type
[optional]
Identifies the type and format of the referenced resource.
標識引用資源的類型和格式。
The value of the attribute MUST be a media type [rfc2046].
屬性的值必須是媒體類型 [ rfc2046]。
rel
[required]
Identifies the relationship of the resource.
標識資源的關係。
The value of the attribute MUST be a space-separated list of
tokens.
屬性的值必須是以空格分隔的標記清單。
Empty 空
This section is non-normative.
本節是非規範性的。
The OPTIONAL encryption.xml
file in the META-INF
directory
holds all encryption information on the contents of the container. If an EPUB creator encrypts any resources within the container, they MUST include an
encryption.xml
file to provide information about the encryption
used.
META-INF
目錄中的 OPTIONAL encryption.xml
檔保存有關容器內容的所有加密資訊。如果 EPUB 建立者對容器中的任何資源進行加密,則它們必須包含一個 encryption.xml
檔來提供有關所用加密的資訊。
encryption
urn:oasis:names:tc:opendocument:xmlns:container
REQUIRED root element [xml] of the
encryption.xml
file.
encryption.xml
檔的 REQUIRED 根元素 [ xml]。
None 沒有
In any order: 按任意順序:
EncryptedKey
[1 or more] EncryptedKey
[1個以上]EncryptedData
[1 or more] EncryptedData
[1個以上]The encryption
element contains child elements of type
EncryptedKey
and EncryptedData
as defined by
[xmlenc-core1].
該 encryption
元素包含類型 EncryptedKey
EncryptedData
為 [ xmlenc-core1] 的子元素。
An EncryptedKey
element describes each encryption key used
in the container, while an EncryptedData
element describes each
encrypted file. Each EncryptedData
element refers to an
EncryptedKey
element, as described in XML Encryption.
元素 EncryptedKey
描述容器中使用的每個加密密鑰,而元素 EncryptedData
描述每個加密檔。每個 EncryptedData
元素都引用一個 EncryptedKey
元素,如 XML 加密中所述。
An XML Schema also informally
defines the content of the encryption.xml
file.
XML 架構還非正式地定義 encryption.xml
文件的內容。
OCF encrypts individual files independently, trading off some security for improved
performance, allowing the container contents to be incrementally decrypted.
Encryption in this way exposes the directory structure and file naming of the whole
package.
OCF 獨立加密單個文件,犧牲一些安全性來提高性能,允許以增量方式解密容器內容。以這種方式加密會公開整個包的目錄結構和檔命名。
OCF uses XML Encryption [xmlenc-core1] to provide a framework for encryption,
allowing a variety of algorithms to be used. XML Encryption specifies a process for
encrypting arbitrary data and representing the result in XML. Even though an OCF abstract container may contain non-XML data, EPUB creators can use XML
Encryption to encrypt all data in an OCF abstract container. OCF encryption
supports only the encryption of entire files within the container, not parts of
files. EPUB creators MUST NOT encrypt the encryption.xml
file when
present.
OCF 使用 XML 加密 [ xmlenc-core1] 來提供加密框架,允許使用各種演算法。XML 加密指定用於加密任意資料並以 XML 表示結果的過程。儘管 OCF 抽象容器可能包含非 XML 數據,但 EPUB 建立者可以使用 XML 加密來加密 OCF 抽象容器中的所有數據。OCF 加密僅支援對容器內的整個文件進行加密,而不支援對部分文件進行加密。EPUB 建立者不得在檔存在時加密 encryption.xml
檔。
Encrypted data replaces unencrypted data in an OCF abstract container. For example,
if an EPUB creator encrypts an image named photo.jpeg
, they should
replace the contents of the photo.jpeg
resource with its encrypted
contents. Within the ZIP directory, EPUB creators SHOULD store encrypted files
rather than Deflate-compress them.
加密數據將替換 OCF 抽象容器中的未加密數據。例如,如果 EPUB 建立者對名為 photo.jpeg
的映像進行加密,則應將 photo.jpeg
資源的內容替換為其加密內容。在 ZIP 目錄中,EPUB 建立者應儲存加密檔,而不是對其進行 Deflate-compress。
Note that some situations require obfuscating the storage
of embedded fonts referenced by an EPUB publication to make them more difficult
to extract for unrestricted use. Although obfuscation is not encryption, reading
systems use the encryption.xml
file in conjunction with the font obfuscation algorithm to identify fonts to
deobfuscate.
請注意,在某些情況下,需要對 EPUB 出版物引用的嵌入字體的存儲進行模糊處理,以使其更難提取以供不受限制地使用。儘管混淆不是加密,但讀取系統將 encryption.xml
檔與字體混淆演算法結合使用,以識別要反混淆的字體。
EPUB creators MUST NOT encrypt the following files:
EPUB 建立者不得加密以下檔案:
mimetype
META-INF/container.xml
META-INF/encryption.xml
META-INF/manifest.xml
META-INF/metadata.xml
META-INF/rights.xml
META-INF/signatures.xml
package document
=] EPUB creators MAY subsequently encrypt signed resources using the Decryption
Transform for XML Signature [xmlenc-decrypt]. This feature enables a
reading system to distinguish data encrypted before signing from data encrypted
after signing.
EPUB 建立者隨後可以使用 XML 簽名的解密轉換 [xmlenc-decrypt] 對簽名資源進行加密。此功能使讀取系統能夠區分簽名前加密的數據和簽名后加密的數據。
When stored in an OCF ZIP container, EPUB creators SHOULD compress streams of
data with non-codec content types before encrypting them. EPUB creators MUST use
Deflate compression. This practice ensures that file entries stored in the ZIP
container have a smaller size.
當存儲在OCF ZIP容器中時,EPUB建立者應該在加密之前壓縮具有非編解碼器內容類型的數據流。EPUB 建立者必須使用Deflate壓縮。這種做法可確保存儲在 ZIP 容器中的檔條目具有較小的大小。
EPUB creators SHOULD NOT compress streams of data with codec content types before
encrypting them. In such cases, additional compression introduces unnecessary
processing overhead at production time (especially with large resource files) and
impacts audio/video playback performance at consumption time. In some cases, the
combination of compression with some encryption schemes might even compromise the
ability of reading systems to handle partial content requests (e.g. HTTP byte
ranges), due to the technical impossibility to determine the length of the full
resource ahead of media playback (e.g. HTTP Content-Length header).
EPUB 建立者在加密之前不應使用編解碼器內容類型壓縮數據流。在這種情況下,額外的壓縮會在生產時引入不必要的處理開銷(尤其是對於大型資源檔),並影響使用時的音訊/視頻播放性能。在某些情況下,壓縮與某些加密方案的結合甚至可能損害讀取系統處理部分內容請求(例如 HTTP 位元組範圍)的能力,因為在媒體播放之前(例如 HTTP Content-Length 標頭)在技術上無法確定完整資源的長度。
When EPUB creators compress streams of data before encrypting, they SHOULD provide
additional EncryptionProperties
metadata to specify the size of the
initial resource (i.e., before compression and encryption), as per the
Compression
XML element defined below. When EPUB creators do not
compress streams of data before encrypting, they MAY provide the additional
EncryptionProperties
metadata to specify the size of the initial
resource (i.e., before encryption).
當 EPUB 建立者在加密之前壓縮數據流時,他們應該提供額外的 EncryptionProperties
元數據來指定初始資源的大小(即在壓縮和加密之前),如下面定義的 Compression
XML 元素所示。當 EPUB 建立者在加密之前不壓縮數據流時,他們可能會提供額外的 EncryptionProperties
元數據來指定初始資源的大小(即在加密之前)。
Compression
http://www.idpf.org/2016/encryption#compression
OPTIONAL child of EncryptionProperty
.
的OPTIONAL子項 EncryptionProperty
。
[required]
方法 [required]
Identifies the compression method used.
標識使用的壓縮方法。
Value is either "0
" (no compression) or "8
"
(Deflate algorithm).
值為 “ 0
”(無壓縮)或 “ 8
” (Deflate 演算法)。
[required]
原始長度 [required]
Represents the size of the initial resource (number of bytes).
表示初始資源的大小(位元元元元)。
Value is a positive integer.
value 是正整數。
Empty 空
The OPTIONAL manifest.xml
file in the META-INF
directory
provides a manifest of files in the container.
META-INF
目錄中的 OPTIONAL manifest.xml
檔提供容器中文件的清單。
The OCF specification does not mandate a format for the manifest.
OCF 規範不強制要求清單的格式。
Note that package documents specify the only manifests used for processing EPUB publications. Reading systems do not use this file.
請注意,包文檔指定僅用於處理 EPUB 出版物的清單。讀取系統不使用此檔。
The OPTIONAL metadata.xml
file in the META-INF
directory is
only for container-level metadata.
META-INF
目錄中的OPTIONAL metadata.xml
檔僅用於容器級元數據。
If EPUB creators include a metadata.xml
file, they SHOULD use only
namespace-qualified elements [xml-names] in it. The file SHOULD contain the root element [xml] metadata
in the
namespace http://www.idpf.org/2013/metadata
, but this specification allows
other root elements for backwards compatibility.
如果 EPUB 建立者包含檔 metadata.xml
,則他們應僅在其中使用限定命名空間的元素 [ xml-names]。該檔應包含命名空間 http://www.idpf.org/2013/metadata
中的根元素 [ xml] metadata
,但此規範允許其他根元素向後相容。
This version of the specification does not define metadata for use in the
metadata.xml
file. Future versions of this specification MAY define
container-level metadata.
此版本的規範未定義在 metadata.xml
檔中使用的元數據。此規範的未來版本可能會定義容器級元數據。
This specification reserves the OPTIONAL rights.xml
file in the
META-INF
directory for the trusted exchange of EPUB publications
among rights holders, intermediaries, and users.
本規範在 META-INF
目錄中保留了OPTIONAL rights.xml
檔,用於在權利人、中間人和用戶之間可信交換EPUB出版物。
When EPUB creators do not include a rights.xml
file, no part of the
OCF abstract container is rights governed at the container level. Rights expressions
might exist within the EPUB publications.
當 EPUB 建立者不包含 rights.xml
檔時,OCF 抽象容器的任何部分都不會在容器級別進行許可權管理。EPUB 出版物中可能存在權利表達。
Adding a digital signature is not a guarantee that a malicious actor cannot tamper
with an EPUB publication as reading systems do not have to check
signatures.
添加數字簽名並不能保證惡意行為者不會篡改 EPUB 出版物,因為讀取系統不必檢查簽名。
The OPTIONAL signatures.xml
file in the META-INF
directory
holds digital signatures for the container and its contents.
META-INF
目錄中的 OPTIONAL signatures.xml
檔保存容器及其內容的數位簽名。
signatures
urn:oasis:names:tc:opendocument:xmlns:container
REQUIRED root element [xml] of the
signature.xml
file.
signature.xml
檔的 REQUIRED 根元素 [ xml]。
None 沒有
Signature
[1 or more] Signature
[1個以上]The signature
element contains child elements of type
Signature
, as defined by [xmldsig-core1]. EPUB creators can
apply signatures to an EPUB publication as a whole or to its parts, and can specify
the signing of any kind of data (i.e., not just XML).
該 signature
元素包含 Signature
類型的子元素,由 [ xmldsig-core1] 定義。EPUB 建立者可以將簽名應用於整個 EPUB 出版物或其部分,並且可以指定任何類型的數據(即,不僅僅是 XML)的簽名。
An XML Schema also informally
defines the content of the signatures.xml
file.
XML 架構還非正式地定義 signatures.xml
文件的內容。
When an EPUB creator does not include a signatures.xml
file, they are
not signing any part of the OCF abstract container at the container level.
Digital signing might exist within the EPUB publication.
當 EPUB 建立者不包含 signatures.xml
檔時,他們不會在容器級別對 OCF 抽象容器的任何部分進行簽名。數字簽名可能存在於 EPUB 出版物中。
When an EPUB creator creates a data signature for the OCF abstact
container, they SHOULD add the signature as the last child Signature
element of the signatures
element.
當 EPUB 建立者為 OCF abstact 容器創建數據簽名時,他們應將簽名添加為 signatures
元素的最後一個子 Signature
元素。
Each Signature
in the signatures.xml
file identifies by
URL [url] the data to which the signature applies, using the [xmldsig-core1]
Manifest
element and its Reference
sub-elements.
EPUB creator may sign individual container files separately or together.
Separately signing each file creates a digest value for the resource that
reading systems can validate independently. This approach might make a Signature
element larger. If EPUB creators sign files together, they can list the set of
signed files in a single XML Signature Manifest
element and
reference them by one or more Signature
elements.
檔中的每個 Signature
元素都使用 [ xmldsig-core1] Manifest
元素及其 Reference
子元素通過 URL [ url] 標識應用簽名 signatures.xml
的數據。EPUB 建立者可以單獨或一起對單個容器文件進行簽名。對每個檔單獨簽名會為讀取系統可以獨立驗證的資源創建一個摘要值。此方法可能會使 Signature 元素變大。如果 EPUB 建立者將檔簽名在一起,則他們可以在單個 XML 簽名 Manifest
元素中列出簽名檔集,並通過一個或多個 Signature
元素引用它們。
EPUB creators can sign any or all files in the OCF abstract
container in their entirety, except for the signatures.xml
file since
that file will contain the computed signature information. Whether and how EPUB
creators sign the signatures.xml
file depends on their objective.
EPUB 建立者可以對 OCF 抽象容器中的任何或所有檔進行完整簽名,但 signatures.xml
檔除外,因為該檔將包含計算出的簽名資訊。EPUB 建立者是否以及如何簽署 signatures.xml
檔取決於他們的目標。
If the EPUB creator wants to allow signatures to be added or removed from the OCF
abstract container without invalidating their signature, they SHOULD NOT sign the
signatures.xml
file.
如果 EPUB 建立者希望允許在 OCF 抽象容器中添加或刪除簽名,而不會使其簽名無效,則他們不應對 signatures.xml
檔進行簽名。
If the EPUB creator wants any addition or removal of a signature to invalidate their
signature, they can use the Enveloped Signature transform defined in Section 6.6.4 of
[xmldsig-core1] to sign the entire pre-existing signature file excluding the
Signature
being created. This transform would sign all previous
signatures, and it would become invalid if a subsequent signature were added to the
package.
如果 EPUB 建立者希望添加或刪除任何簽名以使其簽名無效,則可以使用 [ xmldsig-core1] 的第 6.6.4 節中定義的信封簽名轉換對整個預先存在的簽名檔進行簽名,但不包括正在創建的 Signature
簽名檔。此轉換將對所有以前的簽名進行簽名,如果將後續簽名添加到包中,則該轉換將變為無效。
If the EPUB creator wants the removal of an existing signature to invalidate
their signature, but also wants to allow the addition of signatures, they could
use an XPath transform to sign just the existing signatures. The details of such
a transform are outside the scope of this specification, however.
如果 EPUB 建立者希望刪除現有簽名以使其簽名失效,但又希望允許添加簽名,則可以使用 XPath 轉換僅對現有簽名進行簽名。但是,這種轉換的細節超出了本規範的範圍。
The [xmldsig-core1] specification does not associate any semantics with a
signature; an agent might include semantic information, for example, by adding
information to the Signature element that describes the signature. The
[xmldsig-core1] specification describes how additional information can be added to
a signature, such as by use the SignatureProperties
element.
[ xmldsig-core1] 規範不會將任何語義與簽名相關聯;代理可以包含語義資訊,例如,通過向描述簽名的 Signature 元素添加資訊。[ xmldsig-core1] 規範描述了如何將其他資訊添加到簽名中,例如通過使用 SignatureProperties
元素。
This section is non-normative.
本節是非規範性的。
An OCF ZIP container is a physical single-file manifestation of an OCF abstract container. The container allows:
OCF ZIP 容器是 OCF 抽象容器的物理單文件表現形式。容器允許:
the exchange of in-progress EPUB publication between different individuals and/or
different organizations;
不同個人和/或不同組織之間正在進行的EPUB出版物的交流;
the transfer of EPUB publications from a publisher or conversion house to the
distribution or sales channel; and
將 EPUB 出版物從出版商或轉換公司轉移到分銷或銷售管道;和
the delivery of EPUB publications to EPUB reading systems or users.
將 EPUB 出版物交付給 EPUB 閱讀系統或使用者。
An OCF ZIP container uses the ZIP format as specified by [zip], but with the following
constraints and clarifications:
OCF ZIP 容器使用 [ zip] 指定的 ZIP 格式,但具有以下約束和說明:
The contents of the OCF ZIP container MUST be a conforming OCF abstract container.
OCF ZIP容器的內容必須是符合OCF抽象容器的規範。
OCF ZIP containers MUST NOT use the features in the ZIP application
note [zip] that allow ZIP files to be spanned across multiple storage media or be
split into multiple files.
OCF ZIP容器不得使用ZIP應用說明[zip]中的功能,這些功能允許ZIP檔跨多個存儲介質或拆分為多個檔。
OCF ZIP containers MUST include only stored (uncompressed) and
Deflate-compressed ZIP entries within the ZIP archive.
OCF ZIP 容器必須僅包含 ZIP 存檔中存儲的(未壓縮)和 Deflate 壓縮的 ZIP 條目。
OCF ZIP containers MAY use the ZIP64 extensions defined as "Version
1" in section V, subsection G of the application note [zip] and SHOULD use only those
extensions when the content requires them.
OCF ZIP容器可以使用應用筆記[zip]第五節G小節中定義為“版本1”的ZIP64擴展,並且應僅在內容需要時使用這些擴展。
OCF ZIP containers MUST NOT use the encryption features defined by
the ZIP format; instead, encryption MUST be done using the features described in 4.2.6.3.2 Encryption file (encryption.xml
).
OCF ZIP容器不得使用ZIP格式定義的加密功能;相反,必須使用 4.2.6.3.2 加密檔 ( encryption.xml
) 中描述的功能進行加密。
OCF ZIP containers MUST encode file system names using UTF-8
[unicode].
OCF ZIP 容器必須使用UTF-8 [ unicode] 對檔案系統名稱進行編碼。
The following constraints apply to specific fields in the OCF ZIP container archive:
以下約束適用於OCF ZIP容器存檔中的特定欄位:
In the local file header table, EPUB creators MUST set
the version needed to extract
fields to the values 10
,
20
or 45
to match the maximum version level needed by the
given file (e.g., 20
for Deflate, 45
for ZIP64).
在本地檔頭表中,EPUB 建立者必須將 version needed to extract
字段設置為值 10
, 20
或 45
匹配給定檔所需的最大版本級別(例如, 20
對於Deflate, 45
對於 ZIP64)。
In the local file header table, EPUB creators MUST set the
compression
method field to the values 0
or
8
.
在本地檔案頭表中,EPUB 建立者必須將 compression
方法欄位設定為值 0
或 8
.
EPUB creators MUST include the mimetype
file as the first file in the OCF ZIP container. In addition:
EPUB 建立者必須將該 mimetype
檔作為 OCF ZIP 容器中的第一個檔包含在內。另外:
mimetype
file MUST be the MIME media type [rfc2046]
string application/epub+zip
encoded in US-ASCII [us-ascii].mimetype
文件的內容必須是以 US-ASCII [us-ascii] 編碼的 MIME 媒體類型 [ rfc2046] 字串 application/epub+zip
。mimetype
file MUST NOT contain any leading or trailing padding or white
space.mimetype
不得包含任何前導或尾隨填充或空格。mimetype
file MUST NOT begin with the Unicode byte order mark U+FEFF.mimetype
檔不得以 Unicode 位元組順序標記 U+FEFF 開頭。mimetype
file.mimetype
檔。Refer to I.2 The application/epub+zip
media type for further information about the
application/epub+zip
media type.
有關 application/epub+zip
介質類型的更多資訊,請參閱 I.2 application/epub+zip
介質類型。
Better methods of protecting fonts exist. Both [woff] and [woff2] fonts, for example, allow
the embedding of licensing information and provide some protection through font table
compression. The use of remotely hosted fonts also allows for font subsetting. EPUB creators
are advised to use font obfuscation as defined in this section only when no other options are
available to them. See also the limitations of
obfuscation.
存在更好的字體保護方法。例如,[ woff] 和 [ woff2] 字體都允許嵌入許可資訊,並通過字體表壓縮提供一些保護。使用遠端託管字體還允許字體子集。建議 EPUB 建立者僅在沒有其他選項可用時才使用本節中定義的字體混淆。另請參閱混淆的局限性。
This section is non-normative.
本節是非規範性的。
Since an OCF ZIP container is fundamentally a ZIP file, commonly available ZIP tools can be
used to extract any unencrypted content stream from the package. Moreover, the nature of ZIP
files means that their contents might appear like any other native container on some systems
(e.g., a folder).
由於OCF ZIP容器基本上是一個ZIP檔,因此可以使用常用的ZIP工具從包中提取任何未加密的內容流。此外,ZIP檔的性質意味著它們的內容可能在某些系統(例如,資料夾)上看起來像任何其他本機容器。
While this simplicity of ZIP files is quite useful, it also poses a problem when ease of
extraction of fonts is not a desired side-effect of not encrypting them. An EPUB creator who
wishes to include a third-party font, for example, typically does not want that font extracted
and re-used by others. More critically, many commercial fonts allow embedding, but embedding a
font implies making it an integral part of the EPUB publication, not just providing the
original font file along with the content.
雖然ZIP檔的這種簡單性非常有用,但是當字體的易於提取不是不加密字體的理想副作用時,它也會帶來問題。例如,希望包含第三方字體的 EPUB 建立者通常不希望該字體被其他人提取和重複使用。更關鍵的是,許多商業字體允許嵌入,但嵌入字體意味著使其成為 EPUB 出版物的一個組成部分,而不僅僅是提供原始字體檔和內容。
Since integrated ZIP support is so ubiquitous in modern operating systems, simply placing a font
in the OCF ZIP container is insufficient to signify that the font cannot be reused in other
contexts. This uncertainty can undermine the otherwise useful font embedding capability of EPUB
publications.
由於集成的ZIP支援在現代操作系統中無處不在,因此簡單地將字體放在OCF ZIP容器中不足以表示該字體不能在其他上下文中重複使用。這種不確定性可能會破壞 EPUB 出版物原本有用的字體嵌入功能。
To discourage reuse of their fonts, some font vendors might only allow their use in EPUB
publications if the fonts are bound in some way to the EPUB publication. That is, if the font
file cannot be installed directly for use on an operating system with the built-in tools of that
computing device, and it cannot be directly used by other EPUB publications.
為了阻止重複使用其字體,某些字體供應商可能只允許在 EPUB 出版物中使用字體,前提是字體以某種方式綁定到 EPUB 出版物。也就是說,如果字體檔不能直接安裝以在具有該計算設備的內置工具的操作系統上使用,並且它不能直接被其他 EPUB 出版物使用。
It is beyond the scope of this specification to provide a digital rights management or
enforcement system for fonts. This section instead defines a method of obfuscation that will
require additional work on the part of the final OCF recipient to gain general access to any
obfuscated fonts.
為字體提供數位版權管理或執行系統超出了本規範的範圍。本部分定義了一種混淆方法,該方法需要最終 OCF 收件者進行額外的工作才能獲得對任何混淆字體的常規訪問許可權。
This section is non-normative.
本節是非規範性的。
This specification does not claim that obfuscation constitutes encryption, nor does it guarantee
that the resource will be secure from copyright infringement. The hope is only that this
algorithm will meet the requirements of vendors who require some assurance that their fonts
cannot be extracted simply by unzipping the OCF ZIP container and copying the resource.
本規範並不聲稱混淆構成加密,也不保證資源不會受到版權侵犯。希望這種演算法能夠滿足供應商的要求,他們需要保證他們的字體不能簡單地通過解壓縮OCF ZIP容器並複製資源來提取。
Obfuscation, like any protection scheme, cannot fully protect fonts from being accessed in their
deobfuscated state. The mechanism only provides an obstacle for those who are unaware of the
license details. It will not prevent a determined user from gaining full access to the font
through such alternative means as:
與任何保護方案一樣,混淆不能完全保護字體在反混淆狀態下不被訪問。該機制僅為那些不瞭解許可證詳細資訊的人提供了障礙。它不會阻止確定的使用者通過以下替代方式獲得對字型的完全存取權限:
As a result, whether this method of obfuscation satisfies the requirements of individual font
licenses remains a question for the licensor and licensee. EPUB creators are responsible for
ensuring their use of obfuscation meets font licensing requirements.
因此,這種混淆方法是否滿足單個字體許可證的要求仍然是許可人和被許可人的問題。EPUB 建立者有責任確保其混淆的使用符合字體許可要求。
EPUB creators should also be aware that obfuscation may lead to interoperability issues in
reading systems as reading systems are not required to deobfuscate fonts. As a result, the
visual presentation of their publications may differ from reading system to reading system.
EPUB 建立者還應該意識到,混淆可能會導致閱讀系統的互操作性問題,因為閱讀系統不需要對字體進行反混淆處理。因此,其出版物的視覺呈現可能因閱讀系統而異。
Also note that the algorithm is restricted to obfuscating fonts. It is not intended as a
general-purpose mechanism for obfuscating any resource in the EPUB container.
另請注意,該演算法僅限於混淆字體。它不是用於混淆 EPUB 容器中任何資源的通用機制。
EPUB creators MUST derive the key used in the obfuscation algorithm from the unique identifier.
EPUB 建立者必須從唯一標識符派生混淆演算法中使用的密鑰。
All white space characters, as defined in section 2.3 of the
XML 1.0 specification [xml], MUST be removed from this identifier — specifically, the
Unicode code points U+0020
, U+0009
, U+000D
and
U+000A
.
必須從此標識碼中刪除 XML 1.0 規範 [ xml 第 2.3 節中定義的所有空格字元 — 具體而言,是 Unicode 碼位 U+0020
、 U+0009
和 U+000D
U+000A
。
EPUB creators MUST generate a SHA-1 digest of the UTF-8 representation of the resulting string as
specified by the Secure Hash Standard [fips-180-4]. They can then use this digest as the key
for the algorithm.
EPUB 建立者必須按照安全哈希標準 [fips-180-4] 的規定,生成結果字串的 UTF-8 表示形式的 SHA-1 摘要。然後,他們可以將此摘要用作演算法的金鑰。
The algorithm employed to obfuscate fonts consists of modifying the first 1040 bytes (~1KB) of
the font file. (In the unlikely event that the font file is less than 1040 bytes, this process
will modify the entire file.)
用於混淆字體的演算法包括修改字體檔的前 1040 位元組 (~1KB)。(萬一字體檔小於1040位元組,此過程將修改整個檔。
To obfuscate the original data, store, as the first byte of the embedded font, the result of
performing a logical exclusive or (XOR) on the first byte of the raw font file and the first
byte of the obfuscation key.
若要對原始數據進行模糊處理,請將對原始字體檔的第一個字節和混淆密鑰的第一個字節執行邏輯互斥 OR (XOR) 的結果存儲為嵌入字體的第一個字節。
Repeat this process with the next byte of source and key and continue for all bytes in the key.
At this point, the process continues starting with the first byte of the key and 21st byte of
the source. Once 1040 bytes are encoded in this way (or the end of the source is reached),
directly copy any remaining data in the source to the destination.
對源和鍵的下一個字節重複此過程,並對鍵中的所有位元組繼續。此時,該過程從金鑰的第一個字節和源的第 21 個字節開始繼續。以這種方式編碼 1040 位元組后(或到達源的末尾),直接將源中的任何剩餘數據複製到目標。
EPUB creators MUST obfuscate fonts before compressing and adding them to the OCF ZIP container. Note that as obfuscation is not encryption, this requirement is not a violation of
the one in 4.2.6.3.2 Encryption file (encryption.xml
) to compress fonts before
encrypting them.
EPUB 建立者在壓縮字體並將其添加到 OCF ZIP 容器之前必須對字體進行模糊處理。請注意,由於混淆不是加密,因此此要求不違反 4.2.6.3.2 加密檔 ( encryption.xml
) 中在加密字體之前壓縮字體的要求。
The following pseudo-code exemplifies the obfuscation algorithm.
以下偽代碼舉例說明瞭混淆演算法。
Although not technically encrypted data, all obfuscated fonts MUST have an entry in the encryption.xml
file accompanying the EPUB publication (see 4.2.6.3.2 Encryption file (encryption.xml
)).
儘管不是技術加密數據,但所有混淆字體都必須在 EPUB 出版物隨附 encryption.xml
的檔中有一個條目(請參閱 4.2.6.3.2 加密檔 ( encryption.xml
))。
EPUB creators MUST specify an EncryptedData
element for each obfuscated font.
Each EncryptedData
element MUST contain a child EncryptionMethod
element whose Algorithm
attribute has the value
http://www.idpf.org/2008/embedding
. The presence of this attribute signals the
use of the algorithm described in this specification.
EPUB 建立者必須為每種混淆字體指定一個 EncryptedData
元素。每個 EncryptedData
元素必須包含一個子 EncryptionMethod
元素,其 Algorithm
屬性的值 http://www.idpf.org/2008/embedding
為 。此屬性的存在表示使用本規範中描述的演算法。
EPUB creators MUST list the path to the obfuscated font in the CipherReference
child
of the CipherData
element. As the obfuscation algorithm is restricted to fonts, the
URI
attribute of the CipherReference
element MUST reference a Font core media type resource.
EPUB 建立者必須在 CipherData
元素的 CipherReference
子元素中列出混淆字體的路徑。由於混淆演算法僅限於字體,因此 CipherReference
元素的 URI
屬性必須引用字體核心媒體類型資源。
To prevent trivial copying of the embedded font to other EPUB publications, EPUB creators MUST NOT provide the obfuscation key in the encryption.xml
file.
為防止將嵌入字體複製到其他 EPUB 出版物,EPUB 建立者不得在 encryption.xml
檔中提供混淆密鑰。
All [xml] elements defined in this section are in the http://www.idpf.org/2007/opf
namespace [xml-names] unless otherwise specified.
除非另有說明,否則本節中定義的所有 [ xml] 元素都位於 http://www.idpf.org/2007/opf
命名空間 [ xml-names] 中。
This section is non-normative.
本節是非規範性的。
The package document is an XML document that consists of a set of elements that each encapsulate
information about a particular aspect of an EPUB publication. These elements serve to centralize
metadata, detail the individual resources, and provide the reading order and other information
necessary for its rendering.
包文檔是一個 XML 文件,它由一組元素組成,每個元素都封裝有關 EPUB 出版物特定方面的資訊。這些元素用於集中元數據,詳細說明各個資源,並提供其呈現所需的讀取順序和其他資訊。
The following list summarizes the information found in the package document:
以下清單總結了在包文件中找到的資訊:
Metadata — mechanisms to include and/or reference information
about the EPUB publication.
元數據 — 包含和/或引用有關 EPUB 出版物的信息的機制。
A manifest — identifies via URL [url], and describes via
MIME media type [rfc4839], the set of publication resources.
清單 — 通過 URL [ url] 進行標識,並通過 MIME 媒體類型 [ rfc4839] 描述發佈資源集。
A spine — an ordered sequence of ID references to top-level
resources in the manifest from which reading systems can reach or utilize all other
resources in the set. The spine defines the default reading order.
主幹 — 對清單中頂級資源的ID引用的有序序列,讀取系統可以從中訪問或利用集中的所有其他資源。書脊定義預設的閱讀順序。
Collections — a method of encapsulating and identifying
subcomponents within the EPUB publication.
集合 — 一種封裝和標識 EPUB 出版物中的子元件的方法。
Manifest fallback chains — a mechanism that defines an ordered list of top-level
resources as content equivalents. A reading system can then choose between the resources
based on which it is capable of rendering.
清單回退鍊 — 一種將頂級資源的有序清單定義為內容等效項的機制。然後,閱讀系統可以在它能夠呈現的資源之間進行選擇。
An EPUB publication can reference more than one package document, allowing for alternative
representations of the content. For more information, refer to 4.2.6.3.1 Container file (container.xml
)
一個 EPUB 出版物可以引用多個包文檔,從而允許對內容進行替代表示。有關詳細資訊,請參閱 4.2.6.3.1 容器檔 ( container.xml
)
Refer to I.1 The application/oebps-package+xml
media type for information about the file
properties of package documents.
有關包文檔的文件屬性的資訊,請參閱 I.1 介質 application/oebps-package+xml
類型。
To parse a URL
string url used in the package document, the URL
parser [url] MUST be applied to url, with the content URL of the package
document as base.
若要分析包文檔中使用的 URL 字串 URL,必須將 URL 解析器 [ url] 應用於 url,並將包文檔的內容 URL 作為基礎。
The package
element encapsulates all the information expressed in the package document.
該 package
元素封裝了包文檔中表示的所有資訊。
package
REQUIRED root element [xml] of the package document.
包文件的 REQUIRED 根元素 [ xml]。
In this order: 依此順序:
metadata
[exactly 1]
manifest
[exactly 1]
spine
[exactly 1]
bindings
[0 or 1]
(deprecated)
bindings
[0 or 1]
(已棄用)
collection
[0 or more]
The version
attribute specifies the EPUB specification
version to which the given EPUB publication conforms. The attribute MUST have the value
"3.0
" to indicate conformance with EPUB 3.
該 version
屬性指定給定 EPUB 出版物符合的 EPUB 規範版本。屬性必須具有值 「 3.0
以指示符合 EPUB 3。
Updates to this specification do not represent new versions of EPUB 3 (i.e., each new 3.X
specification is a continuation of the EPUB 3 format). The Working Group is committed to
minimizing any changes that would invalidate existing content, allowing the version
attribute value to remain unchanged.
此規範的更新不代表 EPUB 3 的新版本(即,每個新的 3.X 規範都是 EPUB 3 格式的延續)。工作組致力於盡量減少任何會使現有內容失效的更改,使 version
屬性值保持不變。
The unique-identifier
attribute takes an IDREF
[xml] that identifies the
element that provides the preferred, or primary,
identifier.dc:identifier
該 unique-identifier
屬性採用IDREF[xml],用於標識提供首選或主要標識碼的
元素。dc:identifier
The prefix
attribute provides a declaration mechanism for
prefixes not reserved by this specification. Refer to
D.1.4 The prefix
attribute for more information.
該 prefix
屬性為未由此規範保留的前綴提供聲明機制。有關詳細資訊,請參閱 D.1.4 屬性 prefix
。
The metadata
element encapsulates meta information.
該 metadata
元素封裝元資訊。
metadata
None 沒有
In any order: 按任意順序:
dc:identifier
[1 or more]
dc:title
[1 or more]
dc:language
[1 or more]
Dublin Core Optional Elements
[0 or more]
meta
[1 or more]
link
[0 or more]
The package document metadata
element has two primary functions:
包文件 metadata
元素有兩個主要功能:
to provide a minimal set of meta information for reading systems to use to internally
catalogue an EPUB publication and make it available to a user (e.g., to present in a
bookshelf).
為閱讀系統提供一組最小的元資訊,用於對 EPUB 出版物進行內部編目並提供給使用者(例如,在書架上展示)。
to provide access to all rendering metadata needed to control the layout and display of
the content (e.g., fixed-layout properties).
提供對控制內容佈局和顯示所需的所有渲染元數據(例如,固定佈局屬性)的訪問。
The package document does not provide complex metadata encoding capabilities. If EPUB creators need to provide more detailed information, they can associate metadata records (e.g.,
that conform to an international standard such as [onix] or are created for custom purposes)
using the
element. This approach allows reading systems to process the metadata in its
native form, avoiding the potential problems and information loss caused by translating to use
the minimal package document structure.link
包文檔不提供複雜的元數據編碼功能。如果 EPUB 建立者需要提供更詳細的資訊,他們可以使用該
元素關聯元數據記錄(例如,符合 [ onix] 等國際標準或為自定義目的創建的元數據記錄)。這種方法允許讀取系統以本機形式處理元數據,從而避免了因使用最小包文檔結構進行翻譯而導致的潛在問題和信息丟失。link
In keeping with this philosophy, the package document only has the
following minimal metadata requirements: it MUST contain the [dcterms]
,
dc:title
, and dc:identifier
elements together with the [dcterms]
dc:language
property. All other metadata is OPTIONAL.dcterms:modified
為了與這一理念保持一致,包文檔僅具有以下最低元數據要求:它必須包含 [ dcterms]
、 dc:title
和 dc:identifier
元素以及 [ dcterms] dc:language
屬性。所有其他元數據都是可選的。dcterms:modified
The
element provides a generic mechanism for including metadata properties from any vocabulary. Although EPUB creators MAY use this mechanism
for any metadata purposes, they will typically use it to include rendering metadata defined in
EPUB specifications.meta
該
元素提供了一種通用機制,用於包含來自任何詞彙表的元數據屬性。儘管 EPUB 建立者可以將此機制用於任何元數據目的,但他們通常會使用它來包含 EPUB 規範中定義的呈現元數據。meta
See [epub-a11y-11] for accessibility metadata recommendations.
請參閱 [ epub-a11y-11] 瞭解輔助功能元數據建議。
The Dublin Core elements [dcterms] and
element have mandatory child text content
[dom]. In the descriptions for these elements, this specification refers to this content as
the element's value.meta
Dublin Core 元素 [ dcterms] 和
元素具有必需的子文本內容 [ dom]。在這些元素的描述中,此規範將此內容稱為元素的值。meta
These elements MUST have non-empty values after leading and trailing ASCII
whitespace [infra] is stripped (i.e., they must consist of at least one
non-whitespace character).
在前導和尾隨 ASCII 空格 [ infra] 被剝離后,這些元素必須具有非空值(即,它們必須包含至少一個非空格字元)。
Whitespace within these element values is not significant. Sequences of one or more whitespace
characters are collapsed to a single
space [infra] during processing .
這些元素值中的空格並不重要。在處理過程中,一個或多個空格字元的序列被摺疊到單個空格 [ infra] 。
The dc:identifier
element [dcterms] contains an identifier such as a UUID, DOI or ISBN.
dc:identifier
元素 [ dcterms] 包含一個識別碼,例如 UUID、DOI 或 ISBN。
dc:identifier
http://purl.org/dc/elements/1.1/
id
[conditionally required]
Text 發簡訊
The EPUB creator MUST provide an identifier that is unique to one and only one EPUB publication — its unique identifier — in an dc:identifier
element. This
dc:identifier
element MUST specify an id
attribute whose value
is referenced from the
element's package
unique-identifier
attribute.
EPUB 建立者必須提供元素中 dc:identifier
一個且只有一個 EPUB 出版物唯一的標識碼(其唯一標識符)。此 dc:identifier
元素必須指定一個 id
屬性,其值是從
元素 package
unique-identifier
的屬性引用的。
Although not static, EPUB creators should make changes to the unique identifier for an EPUB
publication as infrequently as possible. Unique Identifiers should have maximal persistence
both for referencing and distribution purposes. EPUB creators should not issue new
identifiers when making minor revisions such as updating metadata, fixing errata, or making
similar minor changes.
雖然不是一成不變的,但 EPUB 建立者應盡可能少地更改 EPUB 出版物的唯一標識符。唯一標識碼應具有最大的持久性,用於引用和分發目的。EPUB 建立者在進行小修訂(例如更新元數據、修正勘誤表或進行類似的小改動)時不應發佈新標識符。
EPUB creators MAY specify additional identifiers. The identifiers should be fully qualified
URIs.
EPUB 建立者可以指定其他識別碼。標識碼應是完全限定的 URI。
EPUB creators MAY use the identifier-type
property to indicate that the value of a dc:identifier
element conforms
to an established system or an issuing authority granted it.
EPUB 建立者可以使用該 identifier-type
屬性來指示 dc:identifier
元素的價值符合既定系統或授予它的頒發機構。
The dc:title
element [dcterms] represents an instance of a name for the EPUB publication.
dc:title
元素 [ dcterms] 表示 EPUB 出版物的名稱實例。
dc:title
http://purl.org/dc/elements/1.1/
Text 發簡訊
The first dc:title
element in document order is the main title
of the EPUB publication (i.e., the primary one reading systems present to users).
文檔順序中的第一個 dc:title
元素是 EPUB 出版物的主標題(即向使用者展示的主要閱讀系統)。
EPUB creators should use only a single dc:title
element to ensure consistent
rendering of the title in reading systems.
EPUB 建立者應僅使用單個 dc:title
元素,以確保標題在閱讀系統中的呈現一致。
Although it is possible to include more than one dc:title
element for
multipart titles, reading system support for additional dc:title
elements
is inconsistent. Reading systems may ignore the additional segments or combine them in
unexpected ways.
儘管可以為多部分標題包含多個 dc:title
元素,但閱讀系統對其他 dc:title
元素的支援並不一致。閱讀系統可能會忽略其他片段或以意想不到的方式組合它們。
For example, the following example shows a basic multipart title:
例如,以下示例顯示了一個基本的多部分標題:
<metadata …>
<dc:title>
THE LORD OF THE RINGS
</dc:title>
<dc:title>
Part One: The Fellowship of the Ring
</dc:title>
…
</metadata>
The same title could instead be expressed using a single dc:title
element as
follows:
可以使用單個 dc:title
元素來表示相同的標題,如下所示:
<metadata …>
<dc:title>
THE LORD OF THE RINGS, Part One:
The Fellowship of the Ring
</dc:title>
…
</metadata>
Previous versions of this specification recommended using the title-type
and display-seq
properties to identify and format the segments of
multipart titles (see the Great Cookbooks example). It is
still possible to add these semantics, but they are also not well supported.
此規範的早期版本建議使用 title-type
and display-seq
屬性來標識多部分標題的段並設置其格式(請參閱 Great Cookbooks 示例)。仍然可以添加這些語義,但它們也沒有得到很好的支援。
The dc:language
element [dcterms] specifies the language of the content of the
EPUB publication.
dc:language
元素 [ dcterms] 指定 EPUB 出版物內容的語言。
dc:language
http://purl.org/dc/elements/1.1/
id
[optional]
Text 發簡訊
The value of each dc:language
element MUST be a well-formed language tag [bcp47].
每個 dc:language
元素的值必須是格式正確的語言標記 [ bcp47]。
Although EPUB creators MAY specify additional dc:language
elements for
multilingual Publications, reading systems will treat the first dc:language
element in document order as the primary language of the EPUB publication.
儘管 EPUB 建立者可以為多語言出版物指定其他 dc:language
元素,但閱讀系統會將文檔順序中的第一個 dc:language
元素視為 EPUB 出版物的主要語言。
Publication resources do not inherit their language from the dc:language
element(s). EPUB creators must set the language of a resource using the intrinsic
methods of the format.
發佈資源不會從 dc:language
元素繼承其語言。EPUB 建立者必須使用格式的固有方法設置資源的語言。
All [dcterms] elements except for
, dc:identifier
, and dc:language
are
designated as OPTIONAL. These elements conform to the following generalized definition:dc:title
除 、
和 dc:language
之外 dc:title
的所有 [ dcterms] 元素都指定為 OPTIONAL。這些元素符合以下廣義定義:dc:identifier
dc:contributor
| dc:coverage
| dc:creator
|
dc:date
| dc:description
| dc:format
|
dc:publisher
| dc:relation
| dc:rights
|
dc:source
| dc:subject
| dc:type
dc:contributor
| dc:coverage
| dc:creator
| dc:date
| dc:description
| dc:format
| dc:publisher
| dc:relation
| dc:rights
| dc:source
| dc:subject
| dc:type
http://purl.org/dc/elements/1.1/
OPTIONAL child of
. Repeatable.metadata
的OPTIONAL子項
。重複。metadata
dir
[optional]
– only allowed on dc:contributor
,
dc:coverage
, dc:creator
,
dc:description
, dc:publisher
,
dc:relation
, dc:rights
, and
dc:subject
.
dir
[optional]
– 只允許在 dc:contributor
、 dc:coverage
、 、 dc:creator
、 dc:description
dc:publisher
和 dc:relation
dc:rights
dc:subject
上 。
id
[optional]
– allowed on any element.
id
[optional]
– 允許在任何元素上。
xml:lang
[optional]
– only allowed on dc:contributor
,
dc:coverage
, dc:creator
,
dc:description
, dc:publisher
,
dc:relation
, dc:rights
, and
dc:subject
.
xml:lang
[optional]
– 只允許在 dc:contributor
、 dc:coverage
、 、 dc:creator
、 dc:description
dc:publisher
和 dc:relation
dc:rights
dc:subject
上 。
Text 發簡訊
This specification does not modify the [dcterms] element definitions except as noted in the
following sections.
本規範不修改 [ dcterms] 元素定義,除非以下各節中另有說明。
The dc:contributor
element [dcterms] is used to represent the name
of a person, organization, etc. that played a secondary role in the creation of the
content.
dc:contributor
元素 [ dcterms] 用於表示在內容建立中起次要作用的個人、組織等的名稱。
The requirements for the dc:contributor
element are identical to those for the
element in all other respects.dc:creator
在所有其他方面,對 dc:contributor
元素的要求與
對元素的要求相同。dc:creator
The dc:creator
element [dcterms] represents the name of a person,
organization, etc. responsible for the creation of the content. EPUB creators MAY associate a role
property
with the element to indicate the function the creator played.
dc:creator
元素 [ dcterms] 表示負責建立內容的個人、組織等的名稱。EPUB 建立者可以將 role
屬性與元素相關聯,以指示建立者所扮演的功能。
The dc:creator
element should contain the name of the creator as EPUB creators
intend reading systems to display it to users.
該 dc:creator
元素應包含創建者的姓名,因為 EPUB 建立者打算閱讀系統將其顯示給使用者。
EPUB creators MAY use the file-as
property
to associate a normalized form of the creator's name, and the
alternate-script
property to represent the
creator's name in another language or script.
EPUB 建立者可以使用該 file-as
屬性來關聯建立者姓名的規範化形式,並使用該 alternate-script
屬性以另一種語言或腳本表示創建者的名稱。
If an EPUB publication has more than one creator, EPUB creators should specify each in a
separate dc:creator
element.
如果 EPUB 出版物有多個建立者,則 EPUB 建立者應在單獨的 dc:creator
元素中指定每個建立者。
The document order of dc:creator
elements in the metadata
section
determines the display priority, where the first dc:creator
element encountered
is the primary creator.
metadata
該部分中元素的 dc:creator
文檔順序決定了顯示優先順序,其中遇到的第一個 dc:creator
元素是主要建立者。
EPUB creators should represent secondary contributors using the
element.dc:contributor
EPUB 建立者應代表使用該
元素的次要貢獻者。dc:contributor
The dc:date
element [dcterms] defines the publication date of the
EPUB publication. The publication date is not the same as the last modified date (the last time the EPUB creator
changed the EPUB publication).
dc:date
元素 [ dcterms] 定義 EPUB 出版物的發佈日期。發佈日期與上次修改日期(EPUB 建立者上次更改 EPUB 發佈時間)不同。
It is RECOMMENDED that the date string conform to [iso8601], particularly the subset
expressed in W3C Date and Time Formats [datetime], as such strings are both human and
machine readable.
建議日期字串符合 [ iso8601],尤其是以 W3C 日期和時間格式 [ datetime 表示的子集,因為此類字串是人類和機器可讀的。
EPUB creators should express additional dates using the specialized date properties available
in the [dcterms] vocabulary, or similar.
EPUB 建立者應使用 [ dcterms] 詞彙表或類似詞彙表中提供的專用日期屬性來表示其他日期。
EPUB publications MUST NOT contain more than one dc:date
element.
EPUB 出版物不得包含多個 dc:date
元素。
The dc:subject
element [dcterms] identifies the subject of the EPUB publication. EPUB creators should set the value of the element to the
human-readable heading or label, but may use a code value if the subject taxonomy does not
provide a separate descriptive label.
dc:subject
元素 [ dcterms] 標識 EPUB 出版物的主題。EPUB 建立者應將元素的值設置為人類可讀的標題或標籤,但如果主題分類未提供單獨的描述性標籤,則可以使用代碼值。
EPUB creators MAY identify the system or scheme they drew the element's value from using
the authority
property.
EPUB 建立者可以識別他們從使用該 authority
屬性中提取元素值的系統或方案。
When a scheme is identified, EPUB creators MUST associate a
subject code using the term
property.
確定方案后,EPUB 建立者必須使用該 term
屬性關聯主題代碼。
The term
property MUST NOT be associated with a
dc:subject
element that does not specify a scheme.
該 term
屬性不得與未指定方案的 dc:subject
元素相關聯。
The values of the dc:subject
element and term
property are case
sensitive only when the designated scheme requires.
僅當指定方案需要時, dc:subject
元素和 term
屬性的值才區分大小寫。
The dc:type
element [dcterms] is used to indicate that the EPUB publication is of a specialized type (e.g., annotations or a dictionary packaged in EPUB
format).
dc:type
元素 [ dcterms] 用於指示 EPUB 出版物屬於特殊類型(例如,以 EPUB 格式打包的註釋或字典)。
EPUB creators MAY use any text string as a value.
EPUB 建立者可以使用任何文字字串作為值。
The former IDPF EPUB 3
Working Group maintained a non-normative registry of specialized EPUB publication types for use with this
element. This Working Group no longer maintains the registry and does not anticipate
developing new specialized publication types.
前IDPF EPUB 3工作組維護了一個非規範性登記冊,用於該要素的專門EPUB出版物類型。該工作組不再維護登記冊,也不期望開發新的專門出版物類型。
The meta
element provides a generic means of including package metadata.
該 meta
元素提供了包含包元數據的通用方法。
meta
As child of the
element. Repeatable.metadata
作為
元素的子元素。重複。metadata
Text 發簡訊
Each meta
element defines a metadata expression. The
property
attribute takes a property
data type value that defines the statement made in the expression, and the text content
of the element represents the assertion. (Refer to D.1 Vocabulary association mechanisms for more
information.)
每個 meta
元素都定義一個元數據表達式。該 property
屬性採用屬性數據類型值,該值定義在表達式中創建的語句,元素的文本內容表示斷言。(有關詳細資訊,請參閱 D.1 詞彙關聯機制。
This specification defines two types of metadata expressions that EPUB creators can define using the meta
element:
此規範定義了兩種類型的元數據表示式,EPUB 建立者可以使用該 meta
元素定義這些表示式:
meta
element establishes some aspect of the EPUB publication. A
meta
element that omits a refines attribute defines a primary
expression.meta
元素中定義的表達式建立 EPUB 發佈的某些方面的表達式。省略 refines 屬性的 meta
元素定義主運算式。meta
element is associated with another expression or resource using the
refines
attribute to enhance its meaning. A subexpression might refine a
media clip, for example, by expressing its duration, or refine a creator or contributor
expression by defining the role of the person.meta
元素中定義的表達式與另一個運算式或資源相關聯,使用該 refines
屬性來增強其含義。子表達式可以優化媒體剪輯,例如,通過表示其持續時間,或者通過定義人員的角色來優化建立者或參與者表達式。EPUB creators MAY use subexpressions to refine the meaning of other subexpressions, thereby
creating chains of information.
EPUB 建立者可以使用子表達式來細化其他子表達式的含義,從而創建資訊鏈。
All the [dcterms] elements represent primary expressions, and permit refinement by
meta element subexpressions.
所有 [ dcterms] 元素都表示主運算式,並允許通過元元素子表達式進行細化。
The Meta Properties Vocabulary is the default vocabulary for use with the property
attribute.
元屬性詞彙表是用於該屬性的 property
默認詞彙表。
EPUB creators MAY add terms from other vocabularies as defined in D.1 Vocabulary association mechanisms.
EPUB 建立者可以從 D.1 詞彙關聯機制中定義的其他詞彙中添加術語。
The scheme
attribute identifies the system or scheme the EPUB
creator obtained the element's value from. The value of the attribute MUST be a property data type value that resolves to the
resource that defines the scheme. The scheme
attribute does not have a default vocabulary (i.e., all values require a prefix).
該 scheme
屬性標識 EPUB 建立者從中獲取元素值的系統或方案。屬性的值必須是解析為定義方案的資源的屬性數據類型值。該 scheme
屬性沒有預設詞彙表(即,所有值都需要前綴)。
The metadata
section MUST contain exactly one dcterms:modified
property [dcterms]
containing the last modification date. The value of this property MUST be an [xmlschema-2]
dateTime conformant date of the form: CCYY-MM-DDThh:mm:ssZ
該 metadata
部分必須只包含一個 dcterms:modified
包含上次修改日期的屬性 [ dcterms]。這個屬性的值必須是以下形式的 [ xmlschema-2] dateTime 符合日期: CCYY-MM-DDThh:mm:ssZ
EPUB creators MUST express the last modification date in Coordinated Universal Time (UTC) and
MUST terminate it with the "Z
" (Zulu) time zone indicator.
EPUB 建立者必須以協調世界時 (UTC) 表示上次修改日期,並且必須以“ Z
”(Zulu) 時區指示符結束該日期。
EPUB creators should update the last modified date whenever they make changes to the EPUB publication.
EPUB 建立者在對 EPUB 出版物進行更改時,應更新上次修改日期。
EPUB creators MAY specify additional modified properties in the package document metadata,
but they MUST have a different subject (i.e., they require a refines
attribute that
references an element or resource).
EPUB 建立者可以在包文檔元數據中指定其他修改屬性,但他們必須具有不同的主題(即,它們需要引用元素或資源的 refines
屬性)。
The requirements for the last modification date are to ensure compatibility with earlier
versions of EPUB 3 that defined a release identifier [epubpackages-32] for EPUB publications.
對上次修改日期的要求是確保與 EPUB 3 的早期版本相容,該版本為 EPUB 出版物定義了版本標識碼 [epubpackages-32]。
The link
element associates resources with an EPUB publication, such as metadata
records.
該 link
元素將資源與 EPUB 發佈(如元數據記錄)相關聯。
link
href
[required]
hreflang
[optional]
id
[optional]
media-type
[conditionally required]
properties
[optional]
refines
[optional]
rel
[required]
Empty 空
The
element MAY contain zero or more metadata
link
elements, each of which
identifies the location of a publication resource or a linked resource in its REQUIRED
href
attribute.
元素
可以包含零個或多個 metadata
link
元素,每個元素在其 REQUIRED href
屬性中標識發佈資源或鏈接資源的位置。
Resources referenced from the link
element are
publication resources only when they are:
僅當從 link
元素引用的資源是發佈資源時,它們才是發佈資源:
referenced from the spine; or
從脊柱參考;或
included or embedded in an EPUB content document (e.g., a metadata record serialized
as RDFa [rdfa-core] or as JSON-LD [json-ld11] embedded in an
[html] script
element).
包含在 EPUB 內容文件中(例如,序列化為 RDFa [rdfa-core] 或嵌入在 [ html] script
元素中的 JSON-LD [json-ld11] 的元數據記錄)。
In all other cases (e.g., when linking to standalone [onix] records), the resources referenced
are not publication resources (i.e., are not subject to core
media type requirements) and EPUB creators MUST NOT list them in the manifest.
在所有其他情況下(例如,當鏈接到獨立的 [onix] 記錄時),引用的資源不是發佈資源(即不受核心媒體類型要求的約束),並且 EPUB 建立者不得在清單中列出它們。
EPUB creators MAY locate linked resources within the EPUB container
or externally, but should consider that reading systems are not required to retrieve
resources outside the EPUB container.
EPUB 建立者可以在 EPUB 容器內或外部查找連結的資源,但應考慮到讀取系統不需要檢索 EPUB 容器外部的資源。
The media-type
attribute is OPTIONAL when a linked resource is located outside the EPUB container, as
more than one media type could be served from the same URL [url]. EPUB creators MUST specify
the attribute for all linked resources within the EPUB container.
當鏈接資源位於 EPUB 容器外部時,該 media-type
屬性是可選的,因為可以從同一 URL [ url] 提供多個媒體類型。EPUB 建立者必須為 EPUB 容器中的所有連結資源指定屬性。
The OPTIONAL hreflang
attribute identifies the language of the
linked resource. The value MUST be a well-formed language
tag [bcp47].
OPTIONAL hreflang
屬性標識鏈接資源的語言。該值必須是格式正確的語言標記 [bcp47]。
The REQUIRED rel
attribute takes a space-separated list of property values that establish the relationship the linked
resource has with the EPUB publication.
REQUIRED rel
屬性採用以空格分隔的屬性值清單,這些屬性值建立鏈接資源與 EPUB 發佈的關係。
The value of the media-type
attribute is not always sufficient to identify the type
of linked resource (e.g., many XML-based record formats use the media type
"application/xml
"). To aid reading systems in the identification of such
generic resources, EPUB creators MAY specify a semantic identifier in the
properties
attribute.
media-type
該屬性的值並不總是足以標識鏈接資源的類型(例如,許多基於 XML 的記錄格式使用媒體類型“ application/xml
”)。為了説明閱讀系統識別此類通用資源,EPUB 建立者可以在屬性中 properties
指定語義標識符。
The Metadata Link Vocabulary is the default vocabulary for the rel
and properties
attributes.
元數據連結詞彙表是 and properties
屬性的 rel
預設詞彙表。
EPUB creators MAY add relationships and properties from other vocabularies as defined in D.1 Vocabulary association mechanisms.
EPUB 建立者可以從 D.1 詞彙關聯機制中定義的其他詞彙中添加關係和屬性。
EPUB creators MAY provide one or more linked metadata records.
EPUB 建立者可以提供一個或多個連結的元數據記錄。
Due to the variety of metadata record formats and serializations that an EPUB creator can
link to an EPUB publication, and the complexity of comparing metadata properties between
them, this specification does not require reading systems to process linked records.
由於 EPUB 建立者可以連結到 EPUB 出版物的元數據記錄格式和序列化種類繁多,並且比較它們之間的元數據屬性非常複雜,因此本規範不需要讀取系統來處理連結的記錄。
In addition to full records, EPUB creators MAY also use the link
element to identify
individual metadata properties available in an alternative format.
除了完整記錄之外,EPUB 建立者還可以使用該 link
元素來識別以替代格式提供的單個元數據屬性。
The manifest
element provides an exhaustive list of publication resources used
in the rendering of the content.
該 manifest
元素提供在呈現內容時使用的發佈資源的詳盡清單。
manifest
REQUIRED second child of
, following package
.metadata
必需的第二個
子項,在 package
之後。metadata
id
[optional]
item
[1 or more]
With the exception of the package document, the
manifest
MUST list all publication resources regardless of whether they are
container resources or remote resources.
除包文檔外, manifest
必須列出所有發佈資源,無論它們是容器資源還是遠端資源。
As the package document is already identified by the container.xml
file, the
manifest
MUST NOT specify an item
element for it (i.e., a
self-reference serves no purpose).
由於 container.xml
包文檔已由文件標識, manifest
因此不得為其指定 item
元素(即,自引用沒有任何用途)。
The manifest is only for listing publication resources. Linked resources and the special files for processing the OCF
Container (i.e., files in the META-INF
directory, and the
mimetype
file) are restricted from inclusion.
清單僅用於列出發佈資源。鏈接的資源和用於處理 OCF 容器的特殊檔(即 META-INF
目錄中的檔案和 mimetype
檔)被限制包含。
Failure to provide a complete manifest of publication resources may lead to rendering issues.
Reading systems might not unzip such resources or could prevent access to them for
security reasons.
未能提供發佈資源的完整清單可能會導致呈現問題。出於安全原因,讀取系統可能無法解壓縮此類資源,或者可能會阻止訪問它們。
The item
element represents a publication resource.
該 item
元素表示發佈資源。
item
fallback
[conditionally required]
href
[required]
id
[required]
media-overlay
[optional]
media-type
[required]
properties
[optional]
Empty 空
Each item
element identifies a publication resource by the
URL [url] in its href
attribute. The value MUST be an
absolute- or path-relative-scheme-less-URL
string [url]. EPUB creators MUST ensure each URL is unique within the
manifest
scope after parsing.
每個 item
元素都通過其 href
屬性中的 URL [ url] 標識發佈資源。該值必須是絕對或路徑相對方案less-URL 字串串 [url]。EPUB 建立者必須確保每個 URL 在解析後在 manifest
範圍內都是唯一的。
The publication resource identified by an item
element
MUST conform to the applicable specification(s) as inferred from the MIME media type [rfc2046]
provided in the media-type
attribute. For core media type resources, EPUB creators MUST use the media type designated in 3.2 Core media types.
item
由元素標識的發佈資源必須符合從屬性中提供的 media-type
MIME媒體類型 [rfc2046] 推斷出的適用規範。對於核心媒體類型資源,EPUB 建立者必須使用 3.2 核心媒體類型中指定的媒體類型。
The fallback
attribute specifies the fallback for the
referenced publication resource. The fallback
attribute's IDREF [xml] value MUST resolve to another item
in the
manifest
.
該 fallback
屬性指定引用的發佈資源的回退。 fallback
屬性的 IDREF [ xml] 值必須解析為 item
. manifest
The fallback for one item
MAY specify a fallback to another item
, and
so on, creating a chain of fallback options. Refer to 3.5.1 Manifest fallbacks for
additional requirements related to the use of fallback chains.
一個 item
MAY的回退指定到另一個 item
的回退,依此類推,創建回退選項鏈。請參閱 3.5.1 清單回退,瞭解與使用回退鏈相關的其他要求。
The media-overlay
attribute takes an IDREF [xml]
that identifies the media overlay document for the resource described by this
item
. Refer to 9.3.5 Media overlays packaging for more information.
該 media-overlay
屬性採用一個 IDREF [ xml],用於標識此 item
.有關詳細資訊,請參閱 9.3.5 媒體覆蓋打包。
The properties
attribute provides information
to reading systems about the content of a resource. This information enables discovery
of key resources, such as the cover image and EPUB navigation document. It also allows
reading systems to optimize rendering by indicating, for example, whether the resource
contains embedded scripting, MathML, or SVG.
該 properties
屬性向讀取系統提供有關資源內容的資訊。通過此資訊可以發現關鍵資源,例如封面圖像和EPUB導航文檔。它還允許讀取系統通過指示資源是否包含嵌入式腳本、MathML 或 SVG 來優化渲染。
The Manifest Properties
Vocabulary is the default vocabulary for the
properties
attribute.
清單屬性詞彙表是該屬性的 properties
默認詞彙表。
EPUB creators MUST set the following properties whenever a resource referenced by an
item
element matches their respective definitions:
每當 item
元素引用的資源與其各自的定義匹配時,EPUB 建立者必須設置以下屬性:
These properties do not apply recursively to content included into a resource (e.g., via the
[html] iframe
element). For example, if a non-scripted XHTML content document
embeds a scripted content document, only the embedded document's manifest
item
properties
attribute will have the scripted
value.
這些屬性不以遞歸方式應用於包含在資源中的內容(例如,通過 [ html] iframe
元素)。例如,如果非腳本 XHTML 內容文檔嵌入了腳本內容文檔,則只有嵌入文檔的 manifest item
properties
屬性才具有該 scripted
值。
EPUB creators MUST declare exactly one item
as the EPUB navigation document
using the nav
property.
EPUB 建立者必須使用該 nav
屬性將一個 item
EPUB 作為 EPUB 導航文檔。
If an EPUB publication contains a cover image, it is recommended to set the cover-image
property, but setting this property
is OPTIONAL.
如果 EPUB 出版物包含封面圖像,建議設置該 cover-image
屬性,但設置此屬性是可選的。
EPUB creators MAY add terms from other vocabularies as defined in D.1 Vocabulary association mechanisms.
EPUB 建立者可以從 D.1 詞彙關聯機制中定義的其他詞彙中添加術語。
The bindings
element defines a set of custom handlers for media types not supported
by this specification.
該 bindings
元素為此規範不支援的媒體類型定義一組自定義處理程式。
Use of the element is deprecated.
不推薦使用該元素。
Refer to the bindings
element definition in [epubpublications-301] for more
information.
有關詳細資訊,請參閱 [ epubpublications-301] 中的 bindings
元素定義。
The spine
element defines an ordered list of manifest
item
references that represent the default reading order.
該 spine
元素定義表示預設讀取順序的清單 item
引用的有序清單。
spine
REQUIRED third child of
, following package
.manifest
需要 的第三個子項
,以下 package
。manifest
id
[optional]
page-progression-direction
[optional]
itemref
[1 or more]
The spine
MUST specify at least one EPUB content document or foreign content document.
spine
必須指定至少一個 EPUB 內容文件或外部內容文檔。
EPUB creators MUST list in the spine
all EPUB and
foreign content documents that are hyperlinked to from publication resources in the
spine
, where hyperlinking encompasses any linking mechanism that requires the
user to navigate away from the current resource. Common hyperlinking mechanisms include the
href
attribute of the [html] a
and area
elements and scripted links (e.g., using
DOM Events and/or form elements). The requirement to list hyperlinked resources applies
recursively (i.e., EPUB creators must list all EPUB and foreign content documents hyperlinked to
from hyperlinked documents, and so on.).
EPUB 建立者必須在 spine
所有 EPUB 和外部內容文檔中列出從 spine
中的出版物資源超連結到的文檔,其中超連結包含任何需要使用者離開當前資源的鏈接機制。常見的超鏈接機制包括 [ html] a
和 area
元素的 href
屬性以及腳本連結(例如,使用 DOM 事件和/或表單元素)。列出超鏈接資源的要求以遞歸方式應用(即,EPUB 建立者必須列出所有 EPUB 和從超連結文檔超連結到的外部內容文檔,依此類推)。
EPUB creators also MUST list in the spine
all EPUB and foreign content documents
hyperlinked to from the EPUB navigation document, regardless of whether EPUB creators
include the EPUB navigation document in the spine
.
EPUB 建立者還必須在所有 spine
EPUB 和從 EPUB 導航文檔超連結到的外部內容文檔中列出,無論 EPUB 建立者是否將 EPUB 導航文檔包含在 spine
.
As hyperlinks to resources outside the EPUB container are not publication resources, they
are not subject to the requirement to include in the spine (e.g., web pages and web-hosted
resources).
由於指向 EPUB 容器外部資源的超連結不是發佈資源,因此它們不受包含在主幹中的要求(例如,網頁和 Web 託管資源)的約束。
Publication resources used in the rendering of spine items (e.g., referenced from [html]
embedded content) similarly do not have to be included in the spine.
用於呈現書脊專案的出版物資源(例如,從 [ html] 嵌入內容引用)同樣不必包含在書脊中。
The page-progression-direction
attribute sets the global direction in which the content flows. Allowed values are
ltr
(left-to-right), rtl
(right-to-left) and default
.
When EPUB creators specify the default
value, they are expressing no preference and
the reading system can choose the rendering direction.
該 page-progression-direction
屬性設置內容流動的全域方向。允許的值為 ltr
(左至右)、 rtl
(右至左)和 default
。當 EPUB 建立者指定 default
該值時,他們沒有表示任何偏好,讀取系統可以選擇呈現方向。
Although the page-progression-direction
attribute sets the global flow direction,
individual EPUB content documents and parts of EPUB content documents MAY override this setting
(e.g., via the writing-mode
CSS property). Reading systems may also provide
mechanisms to override the default direction (e.g., buttons or settings that allow the
application of alternate style sheets).
儘管該 page-progression-direction
屬性設置了全域流向,但單個 EPUB 內容文檔和部分 EPUB 內容文件可能會覆蓋此設置(例如,通過 writing-mode
CSS 屬性)。閱讀系統還可以提供覆蓋預設方向的機制(例如,允許應用替代樣式表的按鈕或設置)。
The legacy
toc
attribute takes an IDREF [xml] that identifies
the manifest item that represents the NCX.
legacy toc
屬性採用標識表示 NCX 的清單項的 IDREF [ xml]。
The itemref
element identifies an EPUB content document or foreign content document in the default reading order.
該 itemref
元素以預設讀取順序標識 EPUB 內容文件或外部內容文檔。
itemref
id
[optional]
idref
[required]
linear
[optional]
properties
[optional]
Empty 空
Each itemref
element MUST reference the ID [xml] of an
in the manifest via the
IDREF [xml] in its item
idref
attribute.
item
element IDs MUST NOT be referenced more than once.
每個 itemref
元素都必須通過其 idref
屬性中的 IDREF [ xml] 引用清單中 an
的 ID [ xml]。 item
item
元素ID不得多次引用。
Each referenced manifest item
MUST be either a) an
EPUB content document or b) a foreign content document that includes an EPUB content
document in its manifest fallback chain.
每個引用的清單 item
必須是 a) EPUB 內容文件或 b) 在其清單回退鏈中包含 EPUB 內容文件的外部內容文件。
Although EPUB publications require an EPUB navigation
document, it is not mandatory to include it in the spine.
儘管 EPUB 出版物需要 EPUB 導航文件,但並非必須將其包含在書脊中。
The linear
attribute indicates whether the referenced
item
contains content that contributes to the primary reading order and that
reading systems must read sequentially ("yes
"), or auxiliary content that
enhances or augments the primary content that reading systems can access out of sequence
("no
"). Examples of auxiliary content include notes, descriptions, and answer
keys.
該 linear
屬性指示引用 item
的內容是否包含有助於主閱讀順序的內容,並且閱讀系統必須按順序閱讀 (“ yes
”),或者是增強或擴充閱讀系統可以不按順序訪問的主要內容 (“ no
”) 的輔助內容。輔助內容的示例包括註釋、描述和答案鍵。
The linear
attribute allows reading systems to distinguish content that a user
should access as part of the default reading order from supplementary content which a reading
system might, for example, present in a popup window or omit from an aural rendering.
該 linear
屬性允許閱讀系統區分使用者應作為預設閱讀順序的一部分訪問的內容與閱讀系統可能呈現在彈出視窗中或從聽覺呈現中省略的補充內容。
Specifying that content is non-linear does not require reading systems to present it in a
specific way, however; it is only a hint to the purpose. Reading systems may present non-linear
content where it occurs in the spine, for example, or may skip it until users reach the end of
the spine.
但是,指定內容是非線性的並不需要閱讀系統以特定方式呈現它;這隻是對目的的暗示。例如,閱讀系統可能會在脊柱中出現非線性內容的地方呈現非線性內容,或者可以跳過它,直到使用者到達脊柱的末端。
EPUB creators should list non-linear content at the end of the spine except when it makes
sense for users to encounter it between linear spine items.
EPUB 建立者應在書脊末尾列出非線性內容,除非用戶在線性書脊項目之間遇到非線性內容是有意義的。
A linear itemref
element is one whose linear
attribute value is explicitly set to "yes
" or that omits the
attribute — reading systems will assume the value "yes
" for
itemref
elements without the attribute. The spine MUST contain at least one
linear itemref
element.
線性 itemref
元素是其 linear
屬性值顯式設置為 “ yes
” 或省略屬性的元素 - 對於沒有屬性的 itemref
元素,讀取系統將假定值為 “ yes
”。脊柱必須包含至少一個線性 itemref
元素。
EPUB creators MUST provide a means
of accessing all non-linear content (e.g., hyperlinks in the content or from the EPUB navigation document).
EPUB 建立者必須提供訪問所有非線性內容的方法(例如,內容中的超連結或 EPUB 導航文件中的超連結)。
The Spine Properties
Vocabulary is the default vocabulary for the
properties
attribute.
Spine 屬性詞彙表是該屬性的預設詞彙 properties
表。
EPUB creators MAY add terms from other vocabularies as defined in D.1 Vocabulary association mechanisms.
EPUB 建立者可以從 D.1 詞彙關聯機制中定義的其他詞彙中添加術語。
The collection
element defines a related group of resources.
該 collection
元素定義一組相關的資源。
collection
OPTIONAL sixth element of package
. Repeatable.
的可選第六個元素 package
。重複。
In this order: metadata
[0 or 1]
, ( collection
[1 or more]
or ( collection
[0 or more]
, link
[1 or more]
))
依此順序: metadata
[0 or 1]
, ( collection
[1 or more]
或 ( collection
[0 or more]
) link
[1 or more]
)
The collection
element allows EPUB creators to assemble resources into logical
groups for a variety of potential uses: enabling reassembly into a meaningful unit of content
split across multiple EPUB content documents (e.g., an index split across multiple
documents), identifying resources for specialized purposes (e.g., preview content), or
collecting together resources that present additional information about the EPUB publication.
該 collection
元素允許 EPUB 建立者將資源組合成邏輯組,用於各種潛在用途:能夠重新組合成一個有意義的內容單元,跨多個 EPUB 內容文檔拆分(例如,跨多個文檔拆分索引),識別用於特定目的的資源(例如,預覽內容),或將提供有關 EPUB 出版物的其他資訊的資源收集在一起。
EPUB creators MUST identify the role of each collection
element in its role
attribute, whose value MUST be one or more NMTOKENs
[xmlschema-2] and/or absolute-URL-with-fragment strings [url].
EPUB 建立者必須標識每個 collection
元素在其 role
屬性中的角色,其值必須是一個或多個 NMTOKEN [ xmlschema-2] 和/或 absolute-URL-with-fragment 字符串 [ url]。
The requirements for authoring specialized collections are defined by their respective
specifications.
創作專用集合的要求由其各自的規範定義。
The former IDPF EPUB 3 Working
Group maintained both a registry of role
extensions and a list of custom
extension roles. This Working Group no longer maintains these registries.
前IDPF EPUB 3工作組維護著角色擴展註冊表和自定義擴展角色清單。本工作組不再維護這些登記冊。
The creation of new collection
element roles is now deprecated.
現在不推薦使用新 collection
元素角色的創建。
Refer to the collection
element definition in [epubpackages-32] for more
information about the creation of specialized collections, including the requirements and
restrictions on their use.
有關創建專用集合的更多資訊,包括使用它們的要求和限制,請參閱 [ epubpackages-32] 中的 collection
元素定義。
The package document legacy features are retained from EPUB 2 only to allow
EPUB creators to author content that can function, to some degree, in reading systems
that only support EPUB 2 publications.
包文檔舊功能從 EPUB 2 中保留,僅允許 EPUB 建立者創作在某種程度上可以在僅支援 EPUB 2 出版物的閱讀系統中起作用的內容。
These features were added primarily to address the overlap period as EPUB 3 reading systems were
developed, as there was still a high probability at that time that users would be opening EPUB 3
publications on EPUB 2 reading systems.
添加這些功能主要是為了解決 EPUB 3 閱讀系統開發時的重疊期問題,因為當時使用者仍然很有可能在 EPUB 2 閱讀系統上打開 EPUB 3 出版物。
As reading systems that only handle EPUB 2 publications are now rare, EPUB creators should
consider the likelihood of their publications still being opened on these types of older devices
before making the effort to add these legacy features.
由於僅處理 EPUB 2 出版物的閱讀系統現在很少見,因此 EPUB 建立者在努力添加這些舊功能之前,應考慮其出版物在這些類型的舊設備上仍被打開的可能性。
EPUB creators MAY include the legacy features defined in this section for compatibility
purposes with EPUB 2 reading systems.
EPUB 建立者可以包含本節中定義的舊功能,以便與 EPUB 2 閱讀系統相容。
EPUB 3 reading systems will not use these features when presenting publications to users.
EPUB 3 閱讀系統在向使用者展示出版物時不會使用這些功能。
EPUB conformance checkers should not alert EPUB creators about the presence of legacy
features in an EPUB publication, as their inclusion is valid for backwards
compatibility. EPUB conformance checkers must alert EPUB creators if a legacy feature does
not conform to its definition or otherwise breaks a usage requirement.
EPUB 一致性檢查器不應提醒 EPUB 建立者 EPUB 出版物中存在舊功能,因為包含這些功能對於向後相容性有效。如果舊功能不符合其定義或以其他方式違反使用要求,EPUB 一致性檢查器必須提醒 EPUB 建立者。
The meta
element [opf-201] provides a means of including generic metadata for EPUB 2 reading systems.
meta
元素 [ opf-201] 提供了一種包含 EPUB 2 讀取系統的通用元數據的方法。
Refer to the meta
element definition in [opf-201] for more information.
有關詳細資訊,請參閱 [ opf-201] 中的 meta
元素定義。
The EPUB 3
element, which uses different attributes and requires text content,
provides metadata capabilities for EPUB 3 reading systems.meta
EPUB 3
元素使用不同的屬性並需要文本內容,為 EPUB 3 讀取系統提供元數據功能。meta
The [opf-201] meta
element also allows EPUB creators to identify a cover
image for EPUB 2 reading systems. In EPUB 3, the cover image must be identified using the cover-image
property on the manifest
for the image.item
[ opf-201] meta
元素還允許 EPUB 建立者識別 EPUB 2 閱讀系統的封面圖像。在 EPUB 3 中,必須使用圖像清單
上的 item
cover-image
屬性來標識封面圖像。
The guide
element [opf-201] provides machine-processable navigation to key structures in
EPUB 2 reading systems.
guide
元件 [ opf-201] 為 EPUB 2 讀取系統中的關鍵結構提供機器可處理的導航。
Refer to the guide
element definition in [opf-201] for more information.
有關詳細資訊,請參閱 [ opf-201] 中的 guide
元素定義。
The landmarks nav in the EPUB navigation document
provides this functionality in EPUB 3 reading systems.
EPUB 導航文件中的標誌導航在 EPUB 3 閱讀系統中提供此功能。
The NCX [opf-201]
provides a table of contents for EPUB 2 reading systems.
NCX [ opf-201] 提供了 EPUB 2 讀取系統的目錄。
Refer to the NCX
definition in [opf-201] for more information.
有關詳細資訊,請參閱 [ opf-201] 中的 NCX 定義。
The EPUB navigation document replaces the NCX for EPUB 3 reading
systems.
EPUB 導航文件取代了 EPUB 3 讀取系統的 NCX。
This section is non-normative.
本節是非規範性的。
This section defines a profile of [html] for creating XHTML content documents. An instance
of an XML document that conforms to this profile is a core media type resource and is
referred to in this specification as an XHTML content document.
本節定義了用於建立 XHTML 內容文件的 [ html] 設定檔。符合此配置檔的 XML 文件的實例是核心媒體類型資源,在本規範中稱為 XHTML 內容文件。
An XHTML content document:
XHTML 內容文件:
MUST be an [html] document that conforms to the XML syntax.
必須是符合 XML 語法的 [ html] 文件。
MUST conform to the conformance criteria for all
document constructs defined by [html] unless explicitly overridden in 6.1.4 HTML deviations and constraints.
必須符合 [ html] 定義的所有文檔結構的一致性標準,除非在 6.1.4 HTML 偏差和約束中明確覆蓋。
MAY include extensions to the [html] grammar as
defined in 6.1.3 HTML extensions, and MUST conform to all content
conformance constraints defined therein.
可以包含對 6.1.3 HTML 擴展中定義的 [ html] 語法的擴展,並且必須符合其中定義的所有內容一致性約束。
Unless specified otherwise, XHTML content documents inherit all definitions of semantics,
structure, and processing behaviors from the [html] specification.
除非另有說明,否則 XHTML 內容文檔從 [ html] 規範繼承語義、結構和處理行為的所有定義。
The recommendation that EPUB publications follow the accessibility requirements in
[epub-a11y-11] applies to XHTML content documents. See Accessibility.
EPUB 出版物遵循 [ epub-a11y-11] 中的輔助功能要求的建議適用於 XHTML 內容文檔。請參閱輔助功能。
This section defines EPUB 3 XHTML content document extensions to the underlying [html]
document model.
本節定義基礎 [ html] 文件模型的 EPUB 3 XHTML 內容文檔擴展。
Although [html] allows user agents to support vendor-neutral extensions, unless such extensions are listed in this section, they
are not supported features of EPUB 3.
儘管 [ html] 允許使用者代理支援與供應商無關的擴展,但除非本節中列出了此類擴展,否則它們不是 EPUB 3 支援的功能。
EPUB creators MAY use the
attribute in XHTML content documents to
express structural semantics.epub:type
EPUB 建立者可以使用 XHTML 內容文檔中的
屬性來表達結構語義。epub:type
The attribute MUST NOT be used on the head
element or metadata content [html].
該屬性不得用於 head
元素或元數據內容 [ html]。
The [html-rdfa] specification defines a set of attributes that EPUB creators MAY use in
XHTML content documents to semantically enrich the content. The use of these attributes
MUST conform to the requirements defined in [html-rdfa].
[ html-rdfa] 規範定義了一組屬性,EPUB 建立者可以在 XHTML 內容文檔中使用這些屬性來從語義上豐富內容。這些屬性的使用必須符合 [ html-rdfa 中定義的要求。
The [html-rdfa] specification defines changes to the [html] content model when authors
use RDFa attributes. This modified content model is valid in XHTML content documents.
[ html-rdfa] 規範定義了作者使用 RDFa 屬性時對 [ html] 內容模型的更改。此修改後的內容模型在 XHTML 內容文件中有效。
The listing of RDFa does not express a preference on the part of the Working Group, only
that these attributes represent an extension of the HTML grammar. EPUB creators can also
specify microdata attributes [html] and linked data [json-ld11] in XHTML content documents as
both are natively supported.
RDFa的清單並不表示工作組的偏好,只是這些屬性代表了HTML語法的擴展。EPUB 建立者還可以在 XHTML 內容文檔中指定微數據屬性 [ html] 和鏈接資料 [ json-ld11],因為兩者都是本機支援的。
The switch
element provides a simple mechanism through which EPUB creators
can tailor the content displayed to users, one that is not dependent on the scripting
capabilities of the EPUB reading system.
該 switch
元素提供了一種簡單的機制,通過該機制,EPUB 建立者可以定製向用戶顯示的內容,該機制不依賴於 EPUB 閱讀系統的腳本功能。
Use of the element is deprecated.
不推薦使用該元素。
Refer to the switch
element definition in [epubcontentdocs-301] for more
information.
有關詳細資訊,請參閱 [ epubcontentdocs-301] 中的 switch
元素定義。
The trigger
element enables the creation of markup-defined user interfaces for
controlling multimedia objects, such as audio and video playback, in both scripted and
non-scripted contexts.
該 trigger
元素允許創建標記定義的使用者介面,用於在腳本和非腳本上下文中控制多媒體物件,例如音訊和視頻播放。
Use of the element is deprecated.
不推薦使用該元素。
Refer to the epub:trigger
element definition in [epubcontentdocs-301]
for more information.
有關詳細資訊,請參閱 [ epubcontentdocs-301] 中的 epub:trigger
元素定義。
XHTML content documents MAY contain custom attributes, which are prefixed [xml-names] attributes whose namespace
URL does not include either of the following strings in its domain [url]:
XHTML 內容文件可以包含自訂屬性,這些屬性的前置碼為 [ xml-names] 屬性,其命名空間 URL 在其域 [ url] 中不包含以下任一字串:
w3.org
idpf.org
When using custom attributes, the content MUST remain consumable by a user without any
information loss or other significant deterioration, regardless of the reading system it
is rendered on.
使用自定義屬性時,無論在何種閱讀系統上呈現內容,用戶都必須保持使用者使用的內容,而不會造成任何信息丟失或其他重大劣化。
Custom attributes are usually defined in a reading system-specific manner and are not
intended for use by other reading systems. This specification should be extended to
provide extensions that multiple independent reading systems can use.
自定義屬性通常以特定於讀取系統的方式定義,不供其他讀取系統使用。此規範應進行擴展,以提供多個獨立讀取系統可以使用的擴展。
This section defines deviations from, and constraints on, the underlying [html] document model
applicable to EPUB 3 XHTML content documents.
本節定義了適用於 EPUB 3 XHTML 內容文檔的基礎 [ html] 文檔模型的偏差和約束。
XHTML content documents support embedded [mathml3]. Occurrences of MathML markup MUST
conform to the constraints expressed in the MathML specification [mathml3], with the
following additional restrictions:
XHTML 內容文件支援嵌入式 [ mathml3]。MathML 標記的出現必須符合 MathML 規範 [mathml3] 中表達的約束,並具有以下附加限制:
The math
element MUST contain only Presentation MathML, except within the
annotation-xml
element.
該 math
元素必須僅包含 Presentation MathML,但 annotation-xml
元素內除外。
EPUB creators MAY include Content MathML within MathML markup in
XHTML content documents, and, when present, MUST include it within an
annotation-xml
child element of a semantics
element.
EPUB 建立者可以在 XHTML 內容文檔的 MathML 標記中包含內容 MathML,並且如果存在,則必須將其包含在 semantics
元素的 annotation-xml
子元素中。
When EPUB creators include Content MathML per
the previous condition, they MUST set the given annotation-xml
element's encoding
attribute to either of the functionally-equivalent
values MathML-Content
or application/mathml-content+xml
,
and the name
attribute to contentequiv
.
當 EPUB 建立者根據上述條件包含 Content MathML 時,他們必須將給定 annotation-xml
元素的 encoding
屬性設置為功能等效值 MathML-Content
或 application/mathml-content+xml
,並將 name
屬性設置為 contentequiv
。
This subset eases the implementation burden on reading systems and promotes
accessibility, while retaining compatibility with [html] user agents.
該子集減輕了閱讀系統的實現負擔並提高了可訪問性,同時保留了與 [ html] 使用者代理的相容性。
The mathml
property of the manifest item
element indicates that an XHTML content document contains
embedded MathML.
manifest item
元素的 mathml
屬性指示 XHTML 內容文件包含嵌入的 MathML。
XHTML content documents support the embedding of SVG document
fragments [svg] by reference (embedding via reference, for example, from
an img
or object
element) and by inclusion (embedding via
direct inclusion of the svg
element in the XHTML content document).
XHTML 內容文件支援透過引用(透過引用嵌入,例如,從 img
OR object
元素)和透過包含(透過在 XHTML 內容文件中直接包含 svg
元素進行嵌入)嵌入 SVG 文件片段 [ svg]。
The content conformance constraints for SVG embedded in XHTML content documents are the same
as defined for SVG content documents in 6.2.3 Restrictions on SVG.
XHTML 內容文件中嵌入的 SVG 的內容一致性約束與 6.2.3 SVG 限制中為 SVG 內容文件定義的約束相同。
The svg
property of the manifest
element indicates that an XHTML content document contains embedded SVG.item
manifest
元素的 item
svg
屬性指示 XHTML 內容文件包含嵌入的 SVG。
This section is non-normative.
本節是非規範性的。
The [html] base
element can be used to specify the document base URL for the purposes of
parsing URLs. When using it in an EPUB publication, the interpretation of the
base
element may inadvertently result in references to remote resources. It may also cause reading systems to misinterpret the location of
hyperlinks (e.g., relative links to other documents in the publication might appear as
links to a web site if the base
element specifies an absolute URL). To
avoid significant interoperability issues, EPUB creators should not use the
base
element.
[ html] base
元素可用於指定文件基 URL,以便分析 URL。在 EPUB 出版物中使用它時,對 base
元素的解釋可能會無意中導致對遠端資源的引用。它還可能導致閱讀系統誤解超連結的位置(例如,如果 base
元素指定了絕對 URL,則指向出版物中其他文檔的相對連結可能顯示為指向網站的連結)。為避免重大的互操作性問題,EPUB 建立者不應使用該 base
元素。
The [html] rp
element is intended to provide a fallback
for older reading systems that do not recognize ruby markup (i.e., a parenthesis
display around ruby
markup). As EPUB 3 reading systems are ruby-aware, and
can provide fallbacks, EPUB creators should not use rp
elements.
[ html] rp
元素旨在為無法識別 ruby 標記的舊閱讀系統提供回退(即標記周圍的 ruby
括號顯示)。由於 EPUB 3 讀取系統具有紅寶石感知功能,並且可以提供回退,因此 EPUB 建立者不應使用 rp
元素。
Since the [html] embed
element element does not include intrinsic facilities to provide fallback
content for reading systems that do not support scripting, EPUB creators are
discouraged from using the element when the referenced resource includes scripting. The
[html] object
element is a better alternative, as it includes intrinsic fallback
capabilities.
由於 [ html] embed
元素元素不包含為不支援腳本的讀取系統提供回退內容的內部功能,因此當引用的資源包含腳本時,不鼓勵 EPUB 建立者使用該元素。[ html] object
元素是更好的選擇,因為它包含內部回退功能。
Reading systems may not support all the features of [svg] or support them across all
platforms that reading systems run on. When utilizing such features, EPUB creators should
consider the inherent risks on interoperability and document longevity.
閱讀系統可能不支援 [ svg] 的所有功能,也不支援閱讀系統運行的所有平臺。在使用此類功能時,EPUB 建立者應考慮互操作性和文檔壽命的固有風險。
This section is non-normative.
本節是非規範性的。
The Scalable Vector Graphics (SVG) specification [svg] defines a format for representing
final-form vector graphics and text.
可縮放向量圖形 (SVG) 規範 [ svg] 定義了一種用於表示最終形式的向量圖形和文本的格式。
Although EPUB creators typically use XHTML content documents as the
top-level document type, the use of SVG content documents
is also permitted. EPUB creators will typically only need SVGs for certain special cases, such
as when final-form page images are the only suitable representation of the content (e.g., for
cover art or in the context of manga or comic books).
儘管 EPUB 建立者通常使用 XHTML 內容文件作為頂級文件類型,但也允許使用 SVG 內容文件。EPUB 創作者通常只需要在某些特殊情況下使用 SVG,例如當最終形式的頁面圖像是內容的唯一合適表示形式時(例如,用於封面藝術或漫畫或漫畫書的上下文)。
This section defines a profile for [svg] documents. An instance of an XML document that
conforms to this profile is a core media type resource and is referred to in this
specification as an SVG content document.
本節定義 [ svg] 文件的設定檔。符合此配置檔的 XML 文件的實例是核心媒體類型資源,在本規範中稱為 SVG 內容文件。
This section defines conformance requirements for SVG content documents. Refer to 6.1.4.2 Embedded SVG for the conformance requirements for SVG embedded in XHTML
content documents.
本節定義 SVG 內容文件的一致性要求。有關XHTML內容文檔中嵌入的SVG的一致性要求,請參閱6.1.4.2嵌入式SVG。
An SVG content document: SVG 內容文件:
MUST be a conforming SVG stand-alone file [svg] and conform to all content conformance
constraints expressed in 6.2.3 Restrictions on SVG.
必須是符合 SVG 的獨立檔 [ svg],並符合 6.2.3 SVG 限制中表示的所有內容一致性約束。
MAY include the
attribute for
expressing structural semantics. When specified,
the attribute MUST only be included on structural,
shape, or text elements [svg].epub:type
可以包括用於表達結構語義的
屬性。指定后,該屬性必須僅包含在結構、形狀或文本元素 [ svg] 上。epub:type
MAY include all applicable vocabulary association mechanisms.
可以包括所有適用的詞彙關聯機制。
The recommendation that EPUB publications follow the accessibility requirements in
[epub-a11y-11] applies to SVG content documents. See Accessibility.
EPUB 出版物遵循 [ epub-a11y-11] 中的輔助功能要求的建議適用於 SVG 內容文檔。請參閱輔助功能。
This specification restricts the content model of SVG content documents and SVG embedded in XHTML content documents as follows:
本規範對 SVG 內容文件和嵌入在 XHTML 內容文件中的 SVG 的內容模型進行如下限制:
The [svg] foreignObject
element:
[ svg] foreignObject
元素:
MUST contain either [html] flow content or exactly one [html] body
element.
必須包含 [ html] 流內容或僅包含一個 [ html] body
元素。
In the case of embedded SVGs, a
body
element is not permitted per the restrictions on SVG defined in [html].
對於嵌入式 SVG,根據 [ html] 中定義的對 SVG 的限制,不允許使用元素 body
。
MUST contain a valid document fragment
that conforms to the XHTML content document model defined in 6.1.2 XHTML requirements.
必須包含符合 6.1.2 XHTML 要求中定義的 XHTML 內容文件模型的有效文件片段。
If the [svg] title
element contains
marked-up text, the markup MUST contain only elements declared in the HTML namespace [infra].
如果 [ svg] 元素包含標記的文字,則標記必須僅包含在 HTML 命名空間 [ infra] title
中聲明的元素。
Although the [svg] title
element allows markup elements, support for this
feature is limited. EPUB creators are advised to use text-only titles for maximum
interoperability.
儘管 [ svg] title
元素允許標記元素,但對此功能的支援是有限的。建議 EPUB 建立者使用純文本標題,以實現最大的互操作性。
This section defines requirements for technologies usable in both XHTML
and SVG content documents.
本節定義了 XHTML 和 SVG 內容文件中可用的技術的要求。
This section is non-normative.
本節是非規範性的。
CSS is an integral part of the Open Web Platform. Readers, publishers, and document authors
expect CSS to "just work," as they expect HTML to just work.
CSS 是開放 Web 平臺不可或缺的一部分。讀者、出版商和文檔作者希望 CSS 能夠「正常工作」 ,就像他們希望 HTML 能夠正常工作一樣。
In the past, EPUB defined a profile of CSS that mandated support for certain properties and
provided prefixed versions of numerous other properties. Although the CSS Working Group no
longer recommends the use of prefixed properties, this specification maintains some prefixed
properties to avoid breaking existing content. But with the minor exceptions defined in this
section, EPUB defers to the W3C to define CSS.
過去,EPUB 定義了一個 CSS 配置檔,該配置文件強制要求支援某些屬性,並提供許多其他屬性的前綴版本。儘管 CSS 工作組不再推薦使用帶前綴的屬性,但此規範保留了一些帶前綴的屬性,以避免破壞現有內容。但是,除了本節中定義的少數例外情況外,EPUB 遵循 W3C 來定義 CSS。
Keep in mind that some reading systems will not support all desired features of CSS.
The following are known to be particularly problematic:
請記住,某些閱讀系統不支援 CSS 的所有所需功能。已知以下問題特別嚴重:
Reading system-induced pagination can interact poorly with style sheets as
reading systems sometimes paginate using columns. This may result in incorrect
values for viewport sizes. Fixed and absolute positioning are particularly
problematic.
閱讀系統誘導的分頁可能與樣式表的交互很差,因為閱讀系統有時會使用列進行分頁。這可能會導致視口大小值不正確。固定和絕對定位尤其成問題。
Some types of screens will render animations and transitions poorly (e.g., those
with high latency).
某些類型的螢幕會呈現較差的動畫和過渡效果(例如,延遲較高的螢幕)。
A CSS style sheet:
CSS 樣式表:
MAY include any CSS properties, with the following
exceptions:
可以包含任何 CSS 屬性,但以下情況除外:
It MUST NOT include the direction
property [css-writing-modes-3].
它不得包含 direction
屬性 [ css-writing-modes-3]。
It MUST NOT include the unicode-bidi
property [css-writing-modes-3].
它不得包含 unicode-bidi
屬性 [ css-writing-modes-3]。
MAY include the prefixed properties defined in 6.3.1.3 Prefixed properties.
可以包括 6.3.1.3 前置屬性中定義的前置屬性。
MUST be encoded in UTF-8 or UTF-16 [unicode], with
UTF-8 as the RECOMMENDED encoding.
必須以UTF-8或UTF-16 [unicode] 編碼,其中UTF-8作為推薦編碼。
This specification restricts the use of the direction
and
unicode-bidi
properties because reading systems might not
implement, or might switch off, CSS processing. EPUB creators must use the following
format-specific methods when they need control over these aspects of the rendering:
此規範限制 direction
了 and unicode-bidi
屬性的使用,因為讀取系統可能無法實現或關閉 CSS 處理。當 EPUB 建立者需要控制渲染的這些方面時,他們必須使用以下特定於格式的方法:
the dir
attribute [html] and direction
attribute [svg] for inline base
directionality.
dir
屬性 [ html] 和 direction
屬性 [ svg] 表示內聯基本方向性。
the bdo
element with the dir
attribute [html] and the
presentation attribute alternative for unicode-bidi
[svg] for bidirectionality.
具有 dir
屬性 [ html] 的 bdo
元素和 unicode-bidi
[ svg] 的 presentation 屬性替代項,用於雙向性。
Earlier version of EPUB included prefixed CSS properties, as many CSS features related to
world languages were not yet mature. To ensure backwards compatibility for content authored
using these prefixes, they have been retained in this specification. Unless otherwise noted,
prefixed properties and values behave exactly as their unprefixed equivalents as described
in the appropriate CSS specification. The prefixed properties are documented in E. Prefixed CSS properties.
早期版本的 EPUB 包含前綴 CSS 屬性,因為許多與世界語言相關的 CSS 功能尚未成熟。為了確保使用這些前綴創作的內容向後相容,它們已保留在此規範中。除非另有說明,否則帶前綴的屬性和值的行為與相應的 CSS 規範中描述的不帶前綴的等效項完全相同。帶前綴的屬性記錄在 E. 帶前綴的 CSS 屬性中。
EPUB creators should use unprefixed properties and reading systems should support
current CSS specifications. This specification retains the widely used prefixed
properties from [epubcontentdocs-301] but removes support for the less-used ones. EPUB
creators should use CSS-native solutions for the removed properties whenever
available.
EPUB 建立者應使用不帶前綴的屬性,閱讀系統應支援當前的 CSS 規範。此規範保留了 [ epubcontentdocs-301] 中廣泛使用的前綴屬性,但刪除了對較少使用的前綴屬性的支援。EPUB 建立者應盡可能對已刪除的屬性使用 CSS 原生解決方案。
The Working Group recommends that EPUB creators currently using these prefixed properties
move to unprefixed versions as soon as support allows, as the Working Group does not
anticipate supporting them in the next major version of EPUB.
工作組建議,當前使用這些帶前綴的屬性的 EPUB 建立者在支援允許的情況下儘快遷移到無前綴版本,因為工作組預計不會在 EPUB 的下一個主要版本中支持它們。
EPUB content documents MAY contain scripting using the facilities defined for this in the
respective underlying specifications ([html] and [svg]). When an EPUB content document
contains scripting, this specification refers to it as a scripted content document. This
label also applies to XHTML content documents that contain [html] form
elements.
EPUB 內容文件可能包含使用相應基礎規範([ html] 和 [ svg])中為此定義的工具的腳本。當 EPUB 內容文件包含文稿時,此規範將其稱為文稿內容文件。此標籤也適用於包含 [ html] form
元素的 XHTML 內容文件。
The scripted
property of the manifest item
element is used to indicate that an EPUB content document is a
scripted content document.
manifest item
元素的 scripted
屬性用於指示 EPUB 內容文件是腳本內容文檔。
When an [html] script
element contains a data
block [html], it does not represent scripted content.
當 [ html] script
元素包含資料塊 [ html] 時,它不表示腳本內容。
[svg] does not define data blocks as of publication, but the same exclusion would apply
if a future update adds the concept.
[ svg] 在發佈時未定義數據塊,但如果將來的更新添加了該概念,則相同的排除將適用。
EPUB creators should note that reading systems are required to behave as though a
unique origin [html] has been assigned to each EPUB publication. In practice, this means that it is not possible for scripts to share data
between EPUB publications.
EPUB 建立者應注意,閱讀系統必須表現得好像每個 EPUB 出版物都分配了一個唯一的來源 [html]。在實踐中,這意味著腳本不可能在 EPUB 發佈之間共享數據。
Which context a script is used in also determines the
rights and restrictions that a reading system places on it (refer to Scripting [epub-rs-33] for more
information).
在哪個上下文中使用腳本還決定了讀取系統對其施加的許可權和限制(有關詳細資訊,請參閱腳本 [ epub-rs-33])。
Reading systems may render scripted content documents in a manner that disables other
EPUB capabilities and/or provides a different rendering and user experience (e.g., by
disabling pagination).
閱讀系統可能會以禁用其他 EPUB 功能和/或提供不同的呈現和用戶體驗(例如,通過禁用分頁)的方式呈現腳本內容文檔。
EPUB 3 defines two contexts for script execution:
EPUB 3 定義了文稿執行的兩個上下文:
iframe
element; andiframe
元素中時;和Scripts may execute in other contexts, but reading system support for these contexts
is optional. For example, a scripted SVG document may be referenced from an [html]
object
element.
腳本可以在其他上下文中執行,但這些上下文的讀取系統支援是可選的。例如,可以從 [ html] object
元素引用腳本化的 SVG 文件。
Refer to the processing of scripts
[epub-rs-33] for more information.
有關詳細資訊,請參閱腳本的處理 [ epub-rs-33]。
Whether EPUB creators embed the code directly in a script
element or
reference it via the element's src
attribute makes no difference to its
executing context.
EPUB 建立者是將代碼直接嵌入 script
到元素中,還是通過元素 src
的屬性引用代碼,都不會影響其執行上下文。
Which context EPUB creators use for their scripts affects both what actions the scripts can
perform and the likelihood of support in reading systems, as described in the following
subsections.
EPUB 建立者對其腳本使用的上下文會影響腳本可以執行的操作以及在讀取系統中提供支援的可能性,如以下小節所述。
Refer to H.2 Scripting contexts for an example of the difference
between the two contexts.
請參閱 H.2 腳本上下文,瞭解兩個上下文之間的差異範例。
A container-constrained script is either of the following:
容器約束文本是以下任一內容:
An instance of the [html] script
element contained in an XHTML content document that is embedded in an XHTML content document using the [html]
iframe
element.
XHTML 內容文件中包含的 [ html] script
元素的實體,該元素使用 [ html] iframe
元素嵌入到 XHTML 內容文件中。
An instance of the [svg] script
element contained in an SVG content document that is embedded in a XHTML content document using the [html]
iframe
element.
SVG 內容文件中包含的 [ svg] script
元素的實體,該元素使用 [ html] iframe
元素嵌入到 XHTML 內容文件中。
A container-constrained script MUST NOT contain
instructions for modifying the DOM of the EPUB content document that embeds it
(i.e., the one that contains the iframe
element). It also MUST NOT contain
instructions for manipulating the size of its containing rectangle.
容器約束的腳本不得包含修改嵌入該文檔的 EPUB 內容文檔(即包含該 iframe
元素的文件)的 DOM 的說明。它也不得包含有關操作其包含矩形大小的說明。
EPUB creators should note that support
for container-constrained scripting in reading systems is only recommended in
reflowable documents [epub-rs-33]. Furthermore, reading system support in
fixed-layout documents is optional.
EPUB 建立者應注意,僅在可重排文檔中建議在讀取系統中支援容器約束腳本 [ epub-rs-33]。此外,固定佈局文件中的閱讀系統支援是可選的。
EPUB creators should ensure container-constrained scripts degrade gracefully in reading
systems without scripting support (see 6.3.2.5 Scripting fallbacks).
EPUB 建立者應確保容器約束的腳本在沒有腳本支持的情況下在讀取系統中正常降級(請參閱 6.3.2.5 腳本回退)。
EPUB creators choosing to restrict the usage of scripting to the
container-constrained model will ensure a more consistent user experience between
scripted and non-scripted content (e.g., consistent pagination behavior).
EPUB 建立者選擇將腳本的使用限制為容器約束模型,將確保腳本內容和非腳本內容之間更一致的用戶體驗(例如,一致的分頁行為)。
A spine-level script is an instance of the [html] script
or [svg] script
element contained in a top-level content document.
主幹級文稿是頂級內容文檔中包含的 [ html] script
或 [ svg] script
元素的實例。
EPUB creators should note that support for spine-level scripting in reading systems is only recommended in fixed-layout documents
and reflowable documents set to
scroll [epub-rs-33]. Furthermore, reading system support in all other contexts
is optional.
EPUB 建立者應注意,僅在固定佈局的文檔和設置為滾動的可重排文檔中建議在閱讀系統中支援主幹級腳本 [ epub-rs-33]。此外,所有其他情況下的閱讀系統支援是可選的。
Top-level content documents that include spine-level
scripting SHOULD remain consumable by the user without any information loss or other
significant deterioration when scripting is disabled or not available (e.g., by
employing progressive enhancement techniques or fallbacks). Failing to account for non-scripted environments in top-level
content documents can result in EPUB publications being unreadable.
當腳本被禁用或不可用時,包含主幹級腳本的頂級內容文檔應保持使用者可使用,而不會丟失任何資訊或其他重大劣化(例如,通過採用漸進式增強技術或回退)。如果未能在頂級內容文檔中考慮非腳本環境,則可能導致 EPUB 出版物無法讀取。
This section is non-normative.
本節是非規範性的。
EPUB creators should consider the wide variety of possible reading system
implementations when adding scripting functionality to their EPUB publications (e.g.,
not all devices have physical keyboards, and in many cases a soft keyboard is activated only
for text input elements). Consequently, EPUB creators should not rely on keyboard events
alone; they should always provide alternative ways to trigger a desired action.
EPUB 建立者在向其 EPUB 出版物添加腳本功能時,應考慮各種可能的閱讀系統實現(例如,並非所有設備都有物理鍵盤,在許多情況下,僅對文本輸入元素啟動軟鍵盤)。因此,EPUB 建立者不應僅依賴鍵盤事件;它們應始終提供觸發所需操作的替代方法。
EPUB content documents that contain scripting SHOULD employ
relevant [wai-aria] accessibility techniques to ensure that the content remains consumable
by all users.
包含腳本的 EPUB 內容文件應採用相關的 [ wai-aria] 可存取性技術,以確保所有使用者都可以使用內容。
EPUB content documents that contain scripting MAY
provide fallbacks for such content, either by using intrinsic fallback mechanisms (such as
those available for the [html] object
and canvas
elements) or, when an intrinsic
fallback is not applicable, by using a manifest-level
fallback.
包含腳本的 EPUB 內容文件可以通過使用內部回退機制(例如可用於 [ html] object
和 canvas
元素的機制)或在內部回退不適用時使用清單級回退來為此類內容提供回退。
EPUB creators MUST ensure that scripts only
generate core media type resources or fragments
thereof.
EPUB 建立者必須確保腳本僅生成核心媒體類型資源或其片段。
This section is non-normative.
本節是非規範性的。
Not all rendering information can be expressed through the underlying technologies that EPUB is built
upon. For example, although HTML with CSS provides powerful layout capabilities, those capabilities
are limited to the scope of the document being rendered.
並非所有渲染資訊都可以通過構建 EPUB 的底層技術來表達。例如,儘管帶有 CSS 的 HTML 提供了強大的佈局功能,但這些功能僅限於正在呈現的文檔的範圍。
This section defines properties that allow EPUB creators to express package-level rendering
intentions (i.e., functionality that can only be implemented by the EPUB reading system). If a
reading system supports the desired rendering, these properties enable the user to be presented the
content as the EPUB creator optimally designed it.
本節定義了允許 EPUB 建立者表達包級呈現意圖的屬性(即只能由 EPUB 讀取系統實現的功能)。如果閱讀系統支援所需的呈現,則這些屬性使用戶能夠在 EPUB 建立者以最佳方式設計內容時呈現內容。
This section is non-normative.
本節是非規範性的。
EPUB publications, unlike print books or PDF files, are designed to change. The content
flows, or reflows, to fit the screen and to fit the needs of the user. As noted in Rendering and CSS "content presentation
adapts to the user, rather than the user having to adapt to a particular presentation of
content." [epub-overview-33]
與印刷書籍或 PDF 檔不同,EPUB 出版物旨在更改。內容流動或重排以適應螢幕並滿足使用者的需求。正如渲染和CSS中所指出的,「內容呈現適應使用者,而不是用戶必須適應特定的內容呈現。[ epub-overview-33]
But this principle does not work for all types of documents. Sometimes content and design are so
intertwined it is not possible to separate them. Any change in appearance risks changing the
meaning or losing all meaning. Fixed-layout documents give EPUB creators greater control
over presentation when a reflowable EPUB is not suitable for the content.
但此原則並不適用於所有類型的文件。有時,內容和設計是如此交織在一起,以至於不可能將它們分開。外觀的任何變化都有可能改變意義或失去所有意義。當可重排的 EPUB 不適合內容時,固定佈局文檔使 EPUB 建立者能夠更好地控制演示文稿。
EPUB creators define fixed layouts using a set of package document
properties to control the rendering in reading systems. In addition, they set the dimensions of each fixed-layout document in its respective
EPUB content document.
EPUB 建立者使用一組包文檔屬性定義固定佈局,以控制閱讀系統中的呈現。此外,他們還在各自的 EPUB 內容文件中設置每個固定佈局文檔的尺寸。
EPUB 3 affords multiple mechanisms for representing fixed-layout content. When fixed-layout
content is necessary, the EPUB creator's choice of mechanism will depend on many factors
including desired degree of precision, file size, accessibility, etc. This section does not
attempt to dictate the EPUB creator's choice of mechanism.
EPUB 3 提供了多種機制來表示固定布局內容。當需要固定佈局內容時,EPUB 建立者對機制的選擇將取決於許多因素,包括所需的精度、檔大小、可訪問性等。本部分不試圖規定 EPUB 建立者對機制的選擇。
The rendition:layout
property specifies whether the content is reflowable or
pre-paginated.
該 rendition:layout
屬性指定內容是可重排還是預分頁。
When the rendition:layout
property is specified on a meta
element, it indicates that the
paginated or reflowable layout style applies globally (i.e., for all spine items).
在 meta
元素上指定該 rendition:layout
屬性時,它指示分頁或可重排佈局樣式全域應用(即,適用於所有主幹項)。
EPUB creators MUST use one of the following values with the rendition:layout
property:
EPUB 建立者必須將以下值之一與 rendition:layout
屬性一起使用:
The content is not pre-paginated (i.e., reading systems apply dynamic pagination
when rendering). Default value.
內容沒有預先分頁(即,閱讀系統在呈現時應用動態分頁)。預設值。
The content is pre-paginated (i.e., reading systems produce exactly one page per
spine
when rendering).itemref
內容是預先分頁的(即,閱讀系統
在渲染時每本書脊只生成一頁)。itemref
Reading systems typically restrict or deny the application of user or user agent style
sheets to pre-paginated documents because dynamic style changes are likely to have
unintended consequence on the intrinsic properties of such documents. EPUB creators
should consider the negative impact on usability and accessibility that these
restrictions have when choosing to use pre-paginated instead of reflowable content.
Refer to Guideline 1.4 - Provide text
configuration [uaag20] for related information.
閱讀系統通常會限制或拒絕將使用者或使用者代理樣式表應用於預分頁的文檔,因為動態樣式更改可能會對此類文檔的內在屬性產生意想不到的後果。EPUB 建立者在選擇使用預分頁內容而不是可重排內容時,應考慮這些限制對可用性和可訪問性的負面影響。有關相關信息,請參閱準則 1.4 - 提供文本配置 [ uaag20]。
When the property is set
to pre-paginated
for a spine item, its content dimensions MUST be set as
defined in 8.2.2.6 Content document dimensions.
pre-paginated
如果將主幹項的屬性設置為,則必須按照8.2.2.6內容文檔尺寸中的定義設置其內容尺寸。
EPUB creators MUST NOT declare the rendition:layout
property more than once.
EPUB 建立者不得多次聲明該 rendition:layout
屬性。
They also MUST NOT declare the property using the refines
attribute. Refer to 8.2.2.1.1 Layout overrides for
setting the property for individual EPUB content documents.
他們也不得使用屬性 refines
聲明屬性。請參閱 8.2.2.1.1 佈局覆蓋,以設置單個 EPUB 內容文檔的屬性。
EPUB creators MAY specify the following properties locally
on spine
elements to override the global value for the given spine item:itemref
EPUB 建立者可以在主幹
元素上本地指定以下屬性,以覆蓋給定主幹項的全域值:itemref
EPUB creators MUST NOT use more than one of these overrides on any given spine item.
EPUB 建立者不得在任何給定的主幹專案上使用多個這些覆蓋。
The rendition:orientation
property specifies which orientation the EPUB creator intends the content to be rendered in.
該 rendition:orientation
屬性指定 EPUB 建立者希望呈現內容的方向。
When the rendition:orientation
property is specified on a
element,
it indicates that the intended orientation applies globally (i.e., for all spine items).meta
在
元素上指定該 meta
rendition:orientation
屬性時,它指示預期的方向應用於全域(即,對於所有主幹項)。
EPUB creators MUST use one of the following values with the
rendition:orientation
property:
EPUB 建立者必須將以下值之一與 rendition:orientation
屬性一起使用:
Reading systems should render the content in landscape orientation.
閱讀系統應以橫向呈現內容。
Reading systems should render the content in portrait orientation.
閱讀系統應以縱向呈現內容。
The content is not orientation constrained. Default value.
內容不受方向限制。預設值。
EPUB creators MUST NOT declare the
rendition:orientation
property more than once.
EPUB 建立者不得多次聲明該 rendition:orientation
屬性。
They also MUST NOT declare the property using the refines
attribute. Refer to 8.2.2.2.1 Orientation overrides
for setting the property for individual EPUB content documents.
他們也不得使用屬性 refines
聲明屬性。請參閱 8.2.2.2.1 方向覆蓋,以設置單個 EPUB 內容文檔的屬性。
EPUB creators MAY specify the following properties
locally on spine
elements to override the global value for the given spine item:itemref
EPUB 建立者可以在主幹
元素上本地指定以下屬性,以覆蓋給定主幹項的全域值:itemref
EPUB creators MUST NOT use more than one of these overrides on any given spine item.
EPUB 建立者不得在任何給定的主幹專案上使用多個這些覆蓋。
The rendition:spread
property specifies the intended reading system
synthetic spread behavior.
該 rendition:spread
屬性指定預期的讀取系統合成傳播行為。
When the rendition:spread
property is specified on a
meta
element, it indicates that the intended synthetic spread behavior
applies globally (i.e., for all spine items).
在 meta
元素上指定該 rendition:spread
屬性時,它表示預期的合成跨頁行為應用於全域(即,適用於所有主幹項)。
EPUB creators MUST use one of the following values with the rendition:spread
property:
EPUB 建立者必須將以下值之一與 rendition:spread
屬性一起使用:
Do not incorporate spine items in a synthetic spread. Reading systems should display
the items in a single viewport positioned at the center of the screen.
不要在合成塗抹醬中加入脊柱物品。閱讀系統應在位於螢幕中心的單個視口中顯示專案。
Render a synthetic spread for spine items only when the device is in landscape
orientation.
僅當設備處於橫向時,才為主幹專案渲染合成跨頁。
The use of spreads only in portrait orientation is deprecated.
不推薦僅在縱向使用跨頁。
EPUB creators should use the value "both
" instead, as spreads that are
readable in portrait orientation are also readable in landscape.
EPUB 建立者應改用值 「 both
」,因為在縱向可讀的跨頁在橫向中也可讀。
Render a synthetic spread regardless of device orientation.
無論設備方向如何,都可呈現合成跨頁。
The EPUB creator is not defining an explicit synthetic spread behavior. Default
value.
EPUB 建立者未定義顯式合成傳播行為。預設值。
EPUB creators MUST NOT declare the rendition:spread
property more than once.
EPUB 建立者不得多次聲明該 rendition:spread
屬性。
They also MUST NOT declare the property using the refines
attribute. Refer to 8.2.2.3.1 Synthetic spread overrides for
setting the property for individual EPUB content documents.
他們也不得使用屬性 refines
聲明屬性。請參閱 8.2.2.3.1 合成跨頁覆蓋,以設置單個 EPUB 內容文檔的屬性。
When synthetic spreads are used in the context of XHTML and
SVG content documents, the dimensions given via the viewport meta
element and viewBox
attribute represents the size of one page in the
spread, respectively.
在 XHTML 和 SVG 內容文件的上下文中使用合成跨頁時,通過 viewport meta
元素和 viewBox
屬性給出的維度分別表示跨頁中一頁的大小。
EPUB creators MAY specify the following properties locally
on spine
elements to override the global value for the given spine item:itemref
EPUB 建立者可以在主幹
元素上本地指定以下屬性,以覆蓋給定主幹項的全域值:itemref
The rendition:spread-portrait
property is deprecated.
該 rendition:spread-portrait
屬性已棄用。
spread-portrait
property definition
in [epubpublications-301] for more information.spread-portrait
屬性定義。EPUB creators MUST NOT use more than one of these overrides on any given spine item.
EPUB 建立者不得在任何給定的主幹專案上使用多個這些覆蓋。
When a reading system renders a synthetic spread, the default behavior is to populate
the spread by rendering the next EPUB content document in the next available unpopulated
viewport, where the next available viewport is determined by the given page progression direction or by
local declarations within EPUB content documents. An EPUB creator MAY override this
automatic population behavior and force reading systems to place a document in a particular
viewport by specifying one of the following properties on its spine itemref
element:
當閱讀系統呈現合成跨頁時,預設行為是通過在下一個可用的未填充視口中呈現下一個 EPUB 內容文檔來填充跨頁,其中下一個可用視口由給定的頁面進度方向或 EPUB 內容文檔中的本地聲明確定。EPUB 建立者可以通過在其主幹 itemref
元素上指定以下屬性之一來覆蓋此自動填充行為,並強制讀取系統將文檔放置在特定視口中:
rendition:page-spread-center
rendition:page-spread-center
property is an alias of the spread-none
property for centering a spine
item.rendition:page-spread-center
屬性是用於居中主幹項的 spread-none
屬性的別名。rendition:page-spread-left
rendition:page-spread-left
property is an alias of the page-spread-left
property for placing a
spine item in the left-hand slot of a two-page spread.rendition:page-spread-left
屬性是 page-spread-left
屬性的別名,用於將主幹項放置在兩頁跨頁的左側插槽中。rendition:page-spread-right
rendition:page-spread-right
property is an alias of the page-spread-right
property for placing a
spine item in the right-hand slot of a two-page spread.rendition:page-spread-right
屬性是用於將書脊項放置在兩頁跨頁的右側插槽中的 page-spread-right
屬性的別名。The rendition:page-spread-center
, rendition:page-spread-left
, and
rendition:page-spread-right
properties apply to both pre-paginated and
reflowable content. They only apply when the reading system is creating synthetic
spreads.
、 rendition:page-spread-center
rendition:page-spread-left
和 rendition:page-spread-right
屬性適用於預分頁內容和可重排內容。它們僅在閱讀系統創建合成點差時適用。
Although EPUB creators often indicate to use a spread in certain device orientations, the
content itself does not represent true spreads (i.e., two consecutive pages that reading
systems must render side-by-side for readability, such as a two-page map). To indicate that
two consecutive pages represent a true spread, EPUB creators SHOULD use the
rendition:page-spread-left
and rendition:page-spread-right
properties on the spine items for the two adjacent EPUB content documents,
and omit the properties on spine items where one-up or two-up presentation is equally
acceptable.
儘管 EPUB 建立者經常指示在某些設備方向上使用跨頁,但內容本身並不代表真正的跨頁(即,閱讀系統必須並排呈現的兩個連續頁面才能提高可讀性,例如兩頁地圖)。為了表明連續兩個頁面代表真實的跨頁,EPUB 建立者應在兩個相鄰的 EPUB 內容文檔的主幹項上使用 rendition:page-spread-left
and rendition:page-spread-right
屬性,並省略單頁或雙頁表示同樣可接受的主幹項上的屬性。
EPUB creators MUST NOT declare more than one rendition:page-spread-*
property,
and/or their unprefixed equivalents, on any given spine item (e.g., it is valid to specify
both "rendition:page-spread-left page-spread-left
" in case reading systems only
support one of properties).
EPUB 建立者不得在任何給定的主幹專案上聲明多個 rendition:page-spread-*
屬性和/或其不帶前綴的等效項(例如,如果讀取系統僅支援其中一個屬性,則同時指定兩個“ rendition:page-spread-left page-spread-left
”是有效的)。
The rendition:page-spread-left
and rendition:page-spread-right
properties were created to allow the use of a single vocabulary for all fixed-layout
properties. EPUB creators can use either property set, but older reading systems might
only recognize the unprefixed versions.
rendition:page-spread-left
創建 and rendition:page-spread-right
屬性是為了允許對所有固定佈局屬性使用單個詞彙表。EPUB 建立者可以使用任一屬性集,但較舊的讀取系統可能只能識別不帶前綴的版本。
The rendition:page-spread-center
was created to make it easier for EPUB
creators to understand the process of switching between two-page spreads and single
centered pages. EPUB creators can use either rendition:page-spread-center
or spread-none
to disable spread behavior in reading systems.
創建該 rendition:page-spread-center
頁面是為了讓 EPUB 建立者更容易理解在兩頁跨頁和單頁居中頁面之間切換的過程。EPUB 建立者可以使用 rendition:page-spread-center
或 spread-none
禁用讀取系統中的傳播行為。
The rendition:viewport
property allows EPUB creators to express the CSS
initial containing block (ICB) [css2] for XHTML and SVG content documents whose rendition:layout
property has been set to
pre-paginated
.
該 rendition:viewport
屬性允許 EPUB 建立者表示 rendition:layout
屬性已設置為 pre-paginated
的 XHTML 和 SVG 內容文件的 CSS 初始包含塊 (ICB) [ css2]。
Use of the property is deprecated.
不推薦使用該屬性。
Refer to the rendition:viewport
property definition
in [epubpublications-301] for more information.
有關詳細資訊,請參閱 [epubpublications-301] 中的 rendition:viewport
屬性定義。
This section defines rules for the expression and interpretation of dimensional properties of
fixed-layout documents.
本節定義了用於表達和解釋固定布局文檔的尺寸屬性的規則。
Fixed-layout documents specify their initial
containing block [css2] in the manner applicable to their format:
固定佈局文件以適用於其格式的方式指定其初始包含塊 [ css2]:
For XHTML fixed-layout documents, the initial
containing block [css2] is obtained from the REQUIRED height
and width
definitions in a viewport
meta
tag, where:
對於 XHTML 固定佈局文件,初始包含塊 [ css2] 是從 viewport
meta
標籤中的 REQUIRED height
和 width
definitions 中獲取的,其中:
height
property MUST have as its value a positive number or the keyword
device-height
; andheight
屬性的值必須為正數或關鍵字 device-height
;和width
property MUST have as its value a positive number or the
keyword device-width
.width
該屬性的值必須為正數或關鍵字 device-width
。The device-width
and device-height
values refer to the 100%
of the width and height, respectively, of the reading system's viewport.
device-width
和 device-height
值分別表示閱讀系統視口的寬度和高度的 100%。
The height
and width
definitions MUST be specified in the
first viewport meta
tag in document order in the [html] head
element. Reading systems
will ignore subsequent viewport meta
tags.
height
必須在 [ html] head
元素中按文件順序在第一個 viewport meta
標記中指定 和 width
定義。讀取系統將忽略後續 viewport meta
標籤。
EPUB creators MUST NOT specify more than one height
or
width
definition within a viewport meta
tag.
EPUB 建立者不得在一個 viewport meta
標籤中指定多個 height
定義 width
或定義。
For SVG fixed-layout documents, the initial containing block [css2]
dimensions MUST be expressed using the viewBox
attribute [svg].
對於 SVG 固定佈局文件,必須使用 viewBox
屬性 [ svg] 表示包含塊 [ css2] 尺寸的初始。
The initial containing block definition affects only the document where it is
defined. The dimensions of the containing blocks in the other content documents within the
same publication may be different.
初始包含塊定義僅影響定義它的文件。同一出版物中其他內容文檔中包含塊的尺寸可能不同。
Although control over the rendering of EPUB content documents to create fixed layouts is an obvious need not handled by other
technologies, there are also considerations for reflowable content that are unique to EPUB publications (e.g., how to handle the flow of content in the viewport). This section defines
properties that allow EPUB creators to control presentation aspects of reflowable content.
儘管控制 EPUB 內容文檔的呈現以創建固定布局顯然是其他技術無法處理的,但對於 EPUB 出版物特有的可重排內容,也有一些注意事項(例如,如何處理視口中的內容流)。本部分定義允許 EPUB 建立者控制可重排內容的表示方面的屬性。
The rendition:flow
property specifies the EPUB creator preference for how
reading systems should handle content overflow.
該 rendition:flow
屬性指定 EPUB 建立者對閱讀系統應如何處理內容溢出的首選項。
When the rendition:flow
property is
specified on a meta
element, it indicates the EPUB creator's global preference for
overflow content handling (i.e., for all spine items). EPUB creators MAY
indicate a preference for dynamic pagination or scrolling. For scrolled content, it is also
possible to specify whether consecutive EPUB content documents are to be rendered as a
continuous scrolling view or whether each is to be rendered separately (i.e., with a dynamic
page break between each).
在 meta
元素上指定該 rendition:flow
屬性時,它指示 EPUB 建立者對溢出內容處理的全域首選項(即,對於所有主幹項)。EPUB 建立者可以指示對動態分頁或滾動的偏好。對於滾動內容,還可以指定是將連續的 EPUB 內容文檔呈現為連續滾動視圖,還是將每個文檔單獨呈現(即,每個文檔之間有一個動態分頁符)。
EPUB creators MUST use one of the following values with the rendition:flow
property:
EPUB 建立者必須將以下值之一與 rendition:flow
屬性一起使用:
Dynamically paginate all overflow content.
動態分頁所有溢出內容。
Render all EPUB content documents such that overflow content is scrollable, and the
EPUB publication is presented as one continuous scroll from spine item to spine item
(except where locally overridden).
呈現所有EPUB內容文檔,使溢出內容可滾動,並且EPUB出版物顯示為從主幹項到主幹項的連續滾動(本地覆蓋的除外)。
Note that EPUB creators SHOULD NOT create publications in which different resources have
different block flow directions, as continuous scrolled rendition in EPUB reading
systems would be problematic.
請注意,EPUB 建立者不應創建不同資源具有不同塊流方向的出版物,因為 EPUB 閱讀系統中的連續滾動演繹會出現問題。
Render all EPUB content documents such that overflow content is scrollable, and each
spine item is presented as a separate scrollable document.
呈現所有EPUB內容文檔,使溢出內容可滾動,並且每個主幹專案都顯示為單獨的可滾動文檔。
Render overflow content using the reading system default method or a user preference,
whichever is applicable. Default value.
使用閱讀系統預設方法或使用者首選項(以適用者為準)呈現溢出內容。預設值。
Note that when two reflowable EPUB content documents occur
sequentially in the spine, the default rendering for their [html] body
elements is consistent with the page-break-before
property [csssnapshot] having been set to
always
. In addition to using the rendition:flow
property, EPUB
creators MAY override this behavior through an appropriate style sheet declaration, if the
reading system supports such overrides.
請注意,當兩個可重排的 EPUB 內容文檔在主幹中依次出現時,其 [ html] body
元素的默認呈現與已設置為 always
的 page-break-before
屬性 [ csssnapshot] 一致。除了使用該 rendition:flow
屬性之外,如果讀取系統支援此類替代,EPUB 建立者還可以通過適當的樣式表聲明來替代此行為。
EPUB creators MUST NOT declare the rendition:flow
property more than once.
EPUB 建立者不得多次聲明該 rendition:flow
屬性。
They also MUST NOT declare the property using the refines
attribute. Refer to 8.3.1.1 Spine overrides for setting the property for
individual EPUB content documents.
他們也不得使用屬性 refines
聲明屬性。請參閱 8.3.1.1 主幹覆蓋,為單個 EPUB 內容文檔設置屬性。
Three column-like rectangles linked left-to-middle and middle-to-right with respective arrows, with a text flowing from one rectangle to the next one. The text is sectioned with headers figuring 'Chapter 1', '2', and '3'. The leftmost rectangle is enclosed in a schematic view of a tablet.
Three column-like rectangles linked left-to-middle and middle-to-right with respective arrows, with a text flowing from one rectangle to the next one. The text is sectioned with headers figuring 'Chapter 1', '2'. The section with 'Chapter 2' starts at the top of the rightmost rectangle, leaving an empty space at the bottom of the middle rectangle. The leftmost rectangle is enclosed in a schematic view of a tablet.
A single, column-like strip (i.e., a rectangle without a bottom edge) with a text flowing down the strip. The text is sectioned with headers figuring 'Chapter 1', '2'. The top part of the strip is enclosed in a schematic view of a tablet.
Three column-like strips (i.e., a rectangles without bottom edges) linked left-to-middle and middle-to-right with respective arrows, each containing a text flowing down the strip. The text is sectioned with headers figuring 'Chapter 1', '2' and '3'. Each strip starts with a chapter header and flows down the strip. The top part of the leftmost strip is enclosed in a schematic view of a tablet.
EPUB creators MAY specify the following properties
locally on spine
elements to override the global value for the given spine item:itemref
EPUB 建立者可以在主幹
元素上本地指定以下屬性,以覆蓋給定主幹項的全域值:itemref
EPUB creators MUST NOT use more than one of these overrides on any given spine item.
EPUB 建立者不得在任何給定的主幹專案上使用多個這些覆蓋。
The rendition:align-x-center
property specifies that the given spine item should be centered horizontally in the viewport or spread.
該 rendition:align-x-center
屬性指定給定的脊柱項應在視口或展開中水準居中。
The property MUST NOT be set globally for all EPUB content documents (i.e., in a
element without a meta
refines
attribute). It is only
available as a spine override for individual EPUB content documents via the
element's itemref
properties
attribute.
不得為所有 EPUB 內容文件(即,在沒有 refines
屬性的
元素中)全域設置該屬性。它只能通過 meta
元素的 itemref
properties
屬性作為單個 EPUB 內容文檔的主幹覆蓋。
This property was developed primarily to handle "Naka-Tobira (中扉)" (sectional title pages),
in the absence of reliable centering control within the content rendering. As support for
paged media evolves in CSS, however, this property is expected to be deprecated. EPUB creators are encouraged to use CSS solutions when effective.
此屬性主要用於處理“Naka-Tobira (中扉)”(部分標題頁),在內容呈現中缺乏可靠的居中控制。但是,隨著 CSS 中對分頁媒體的支持不斷發展,此屬性預計將被棄用。鼓勵 EPUB 建立者在有效時使用 CSS 解決方案。
This section is non-normative.
本節是非規範性的。
Mainstream ebooks, educational tools and ebooks formatted for persons with print disabilities are
some examples of works that contain synchronized audio narration. In EPUB 3, EPUB creators can
create these types of books using media overlay documents to describe the timing for the
pre-recorded audio narration and how it relates to the EPUB content document markup. The
specification defines the file format for media overlays as a subset of [smil3], a W3C
recommendation for representing synchronized multimedia information in XML.
主流電子書、教育工具和為閱讀障礙者格式化的電子書是包含同步音訊旁白的一些作品示例。在 EPUB 3 中,EPUB 建立者可以使用媒體疊加文檔創建這些類型的圖書,以描述預先錄製的音訊旁白的時間以及它與 EPUB 內容文檔標記的關係。該規範將媒體疊加的檔格式定義為 [smil3] 的子集,這是 W3C 建議,用於在 XML 中表示同步的多媒體資訊。
The text and audio synchronization enabled by media overlays provides enhanced accessibility for any
user who has difficulty following the text of a traditional book. Media overlays also provide a
continuous listening experience for readers who are unable to read the text for any reason,
something that traditional audio embedding techniques cannot offer. They are even useful for
purposes not traditionally considered accessibility concerns (e.g., for language learning).
媒體疊加支援的文本和音訊同步為任何難以理解傳統書籍文本的使用者提供了增強的可訪問性。媒體疊加還為因任何原因無法閱讀文本的讀者提供了連續的聆聽體驗,這是傳統音訊嵌入技術無法提供的。它們甚至可用於傳統上不考慮可訪問性問題的目的(例如,用於語言學習)。
The media overlays feature is transparent to EPUB reading systems that do not support the
feature. The inclusion of media overlays in an EPUB publication has no impact on the ability of
media overlay-unaware reading systems to render the EPUB publication as though the media overlays
are not present.
媒體疊加功能對於不支援該功能的 EPUB 讀取系統是透明的。在 EPUB 出版物中包含媒體疊加層對無介質疊加感的閱讀系統呈現 EPUB 出版物的能力沒有影響,就好像媒體疊加層不存在一樣。
Media overlays in EPUB are not an equivalent to audiobooks, as audiobooks are primarily audio-based
with text occasionally provided as an alternate format. The W3C [audiobooks] recommendation is for
building audio publications.
EPUB 中的媒體疊加並不等同於有聲讀物,因為有聲讀物主要是基於音訊的,偶爾會提供文本作為替代格式。W3C [ 有聲讀物] 建議用於構建音訊出版物。
Although future versions of this specification might incorporate support for video media (e.g.,
synchronized text/sign-language books), this version supports only synchronizing audio media with
the EPUB content document.
儘管此規範的未來版本可能會包含對視頻媒體(例如,同步文本/手語書籍)的支援,但此版本僅支援將音訊媒體與EPUB內容文檔同步。
A media overlay document:
媒體疊加文件:
MUST be valid to the media overlays schema as defined in
G.3 Media overlays schema and conform to all content conformance
constraints expressed in 9.2.2 Media overlay document definition.
必須對 G.3 媒體疊加架構中定義的媒體疊加架構有效,並符合 9.2.2 媒體疊加文檔定義中表達的所有內容一致性約束。
MAY refer to more than one EPUB content document,
but more than one media overlay document MUST NOT reference the same EPUB content
document.
可以引用多個 EPUB 內容文件,但多個媒體疊加文檔不得引用相同的 EPUB 內容文件。
All elements [xml] defined in this section are in the https://www.w3.org/ns/SMIL
namespace [xml-names] unless otherwise specified.
除非另有說明,否則本節中定義的所有元素 [ xml] 都位於 https://www.w3.org/ns/SMIL
命名空間 [ xml-names] 中。
The smil
element encapsulates all the information in an media overlay document.
該 smil
元素將所有資訊封裝在媒體疊加文檔中。
smil
REQUIRED root element [xml] of the media overlay
document.
媒體疊加文件的 REQUIRED 根元素 [ xml]。
version
[required]
Specifies the version number of the [smil3] specification to which the
media overlay document adheres.
指定媒體覆蓋文件遵循的 [smil3] 規範的版本號。
This attribute MUST have the value "3.0
".
此屬性必須具有值 “ 3.0
”
id
[optional]
The ID [xml] of the element, which MUST be unique
within the document scope.
元素的ID[xml],在文件範圍內必須是唯一的。
epub:prefix
[optional]
Declares additional metadata vocabulary prefixes.
聲明其他元數據詞彙前綴。
Refer to 9.3.3 Structural semantics in overlays for more
information.
有關更多資訊,請參見 9.3.3 疊加中的結構語義。
In this order: 依此順序:
The head
element is the container for metadata in the media overlay document.
該 head
元素是媒體疊加文檔中元數據的容器。
head
The head
element is the OPTIONAL first child of the
element.smil
該 head
元素是
元素的 OPTIONAL 第一個子元素。smil
None 沒有
metadata
[0 or 1]
As this specification does not define any metadata properties that must occur in the media
overlay document, the head
element is OPTIONAL.
由於此規範未定義媒體疊加文檔中必須出現的任何元數據屬性,因此該 head
元素是可選的。
The metadata
element represents metadata for the media overlay document. The
metadata
element is an extension point that allows the inclusion of
metadata from any metainformation structuring language.
該 metadata
元素表示媒體疊加文檔的元數據。該 metadata
元素是一個擴展點,允許包含來自任何元資訊結構化語言的元數據。
metadata
None 沒有
[0 or more]
elements from any namespace
[0 or more]
任何命名空間中的元素
This specification does not require any metadata properties in the media overlay document;
the metadata
element is provided for custom metadata requirements.
此規範不需要介質疊加文檔中的任何元數據屬性;該 metadata
元素是為滿足自定義元數據要求而提供的。
The body
element is the starting point for the presentation contained in the
media overlay document. It contains the main sequence of
and par
elements.seq
該 body
元素是媒體疊加文檔中包含的演示文稿的起點。它包含和
元素的 seq
主序列。par
body
The body
element is a REQUIRED child of the
element. It follows
the smil
element, when that element is present.head
元素 body
是
元素的 REQUIRED 子元素。當元素存在時,它跟隨 smil
該元素。head
epub:type
[optional]
An expression of the structural semantics of the corresponding element in the
EPUB content document.
EPUB 內容文件中相應元素的結構語義的表達式。
The value is a white space separated list of property types. Refer to 9.3.3 Structural semantics in overlays for more information.
該值是以空格分隔的屬性類型清單。有關更多資訊,請參見 9.3.3 疊加中的結構語義。
id
[optional]
The ID [xml] of the element, which MUST be unique
within the document scope.
元素的ID[xml],在文件範圍內必須是唯一的。
epub:textref
[optional]
Refers to the associated EPUB content document and, optionally, identifies a
specific part of it.
引用關聯的 EPUB 內容文件,並(可選)標識其特定部分。
The value MUST be a path-relative-scheme-less-URL string, optionally
followed by U+0023 (#)
and a URL-fragment string.
該值必須是 path-relative-scheme-less-URL 字串,後跟 U+0023 (#)
URL-fragment 字串串(可選)。
In any order: 按任意順序:
MUST include at least one par
or seq
.
必須至少包含或 par
seq
.
The seq
element is a sequential time container for media objects and/or child
time containers.
該 seq
元素是媒體物件和/或子時間容器的順序時間容器。
seq
One or more seq
elements MAY occur as children of the
element
and of the body
element.seq
一個或多個 seq
元素可以作為
元素和 body
元素的子元素出現。seq
epub:type
[optional]
An expression of the structural semantics of the corresponding element in the
EPUB content document.
EPUB 內容文件中相應元素的結構語義的表達式。
The value is a white space separated list of property types. Refer to 9.3.3 Structural semantics in overlays for more information.
該值是以空格分隔的屬性類型清單。有關更多資訊,請參見 9.3.3 疊加中的結構語義。
id
[optional]
The ID [xml] of the element, which MUST be unique
within the document scope.
元素的ID[xml],在文件範圍內必須是唯一的。
epub:textref
[required]
Refers to the associated EPUB content document and, optionally,
identifies a specific part of it.
引用關聯的 EPUB 內容文件,並(可選)標識其特定部分。
The value MUST be a path-relative-scheme-less-URL string, optionally
followed by U+0023 (#)
and a URL-fragment string.
該值必須是 path-relative-scheme-less-URL 字串,後跟 U+0023 (#)
URL-fragment 字串串(可選)。
Refer to 9.3.2.1 Overlay structure for more
information.
有關詳細資訊,請參閱 9.3.2.1 覆蓋結構。
In any order: 按任意順序:
MUST include at least one par
or seq
.
必須至少包含或 par
seq
.
The par
element is a parallel time container for media objects.
該 par
元素是媒體物件的並行時間容器。
par
One or more par
elements MAY occur as children of the
and
body
elements.seq
一個或多個 par
元素可以作為
and body
元素的子元素出現。seq
epub:type
[optional]
An expression of the structural semantics of the corresponding element in the
EPUB content document.
EPUB 內容文件中相應元素的結構語義的表達式。
The value is a white space separated list of property types. Refer to 9.3.3 Structural semantics in overlays for more information.
該值是以空格分隔的屬性類型清單。有關更多資訊,請參見 9.3.3 疊加中的結構語義。
id
[optional]
The ID [xml] of the element, which MUST be unique
within the document scope.
元素的ID[xml],在文件範圍內必須是唯一的。
In any order: 按任意順序:
The text
element references an element in an EPUB content document. A
text
element typically refers to a textual element but can also refer to
other EPUB content document media elements. In the absence of a sibling
element, textual content referred to by this element may be rendered via text-to-speech.audio
該 text
元素引用 EPUB 內容文件中的元素。 text
元素通常引用文本元素,但也可以引用其他 EPUB 內容文檔媒體元素。在沒有同級
元素的情況下,此元素引用的文本內容可以通過文本轉語音呈現。audio
text
As a REQUIRED child of the
element.par
作為
元素的 REQUIRED 子元素。par
src
[required]
Refers to the associated EPUB content document and, optionally, identifies a
specific part of it.
引用關聯的 EPUB 內容文件,並(可選)標識其特定部分。
The value MUST be a path-relative-scheme-less-URL string, optionally
followed by U+0023 (#)
and a URL-fragment string.
該值必須是 path-relative-scheme-less-URL 字串,後跟 U+0023 (#)
URL-fragment 字串串(可選)。
id
[optional]
The ID [xml] of the element, which MUST be unique
within the document scope.
元素的ID[xml],在文件範圍內必須是唯一的。
Empty 空
This specification places no restriction on the src
attribute of a
text
element. EPUB creators should, however, refer to a content that
can be styled with CSS to make the association with style
information effective (i.e., palpable content for XHTML or paths, basic shapes, or text elements in SVG).
此規範對 text
元素 src
的屬性沒有限制。但是,EPUB 建立者應引用可以使用 CSS 設置樣式的內容,以使與樣式信息的關聯有效(即 XHTML 或路徑的可觸及內容、基本形狀或 SVG 中的文字元素)。
[epub-rs-33] no longer provides guidance for reading systems on the playback
of timed media (i.e., the automatic starting of the referenced media). Although the
src
attribute of a text
element may refer to embedded timed
media (e.g., via an [html] video
element), referencing such media may have
unpredictable results.
[ epub-rs-33] 不再為閱讀系統提供定時媒體播放(即引用媒體的自動啟動)的指導。儘管 text
元素的 src
屬性可能引用嵌入的定時媒體(例如,通過 [ html] video
元素),但引用此類媒體可能會產生不可預知的結果。
The audio
element represents a clip of audio media.
該 audio
元素表示音訊媒體的剪輯。
audio
id
[optional]
The ID [xml] of the element, which MUST be unique
within the document scope.
元素的ID[xml],在文件範圍內必須是唯一的。
src
[required]
The relative- or absolute-URL string [url] reference to an audio file. The audio
file MUST be one of the audio formats listed in the core media type resources table.
對音訊檔的相對或絕對 URL 字串 [ url] 引用。音訊檔必須是核心媒體類型資源表中列出的音訊格式之一。
clipBegin
[optional]
A clock value that specifies the offset into the physical media corresponding
to the start point of an audio clip.
一個時鐘值,該值指定與音訊剪輯的起點相對應的物理媒體的偏移量。
MUST be a [smil3] clock
value.
必須是 [ smil3] 時鐘值。
See H.4 Clock values. 請參閱 H.4 時鐘值。
clipEnd
[optional]
A clock value that specifies the offset into the physical media corresponding
to the end point of an audio clip.
一個時鐘值,該值指定與音訊剪輯的端點相對應的物理媒體的偏移量。
MUST be a [smil3] clock
value.
必須是 [ smil3] 時鐘值。
See H.4 Clock values. 請參閱 H.4 時鐘值。
The chronological offset of the terminating position MUST be after the
starting offset specified in the clipBegin
attribute.
終止位置的時間偏移量必須在屬性中 clipBegin
指定的起始偏移量之後。
Empty 空
This section is non-normative.
本節是非規範性的。
EPUB creators can represent a pre-recorded narration of a publication as a series of audio
clips, each corresponding to part of an EPUB content document. A single audio clip, for
example, typically represents a single phrase or paragraph, but infers no order relative to the
other clips or to the text of a document. Media overlays solve this problem of synchronization
by tying the structured audio narration to its corresponding text (or other media) in the EPUB
content document using [smil3] markup. Media overlays are, in fact, a simplified subset of
SMIL 3.0 that define the playback sequence of these clips.
EPUB 建立者可以將出版物的預先錄製的敘述表示為一系列音訊剪輯,每個音訊剪輯對應於 EPUB 內容文檔的一部分。例如,單個音訊剪輯通常表示單個短語或段落,但不會推斷出相對於其他剪輯或文檔文本的順序。媒體疊加通過使用 [smil3] 標記將結構化音訊旁白綁定到 EPUB 內容文檔中的相應文本(或其他媒體)來解決此同步問題。事實上,媒體疊加是SMIL 3.0的簡化子集,用於定義這些剪輯的播放順序。
The SMIL elements primarily used for structuring media overlays are
(used for the main
sequence), body
(sequence) and seq
(parallel). (Refer to 9.2.2 Media overlay document definition
for more information on these and other SMIL elements.)par
主要用於構建媒體疊加層的 SMIL 元素是
(用於主序列)、 body
(序列)和 seq
(並行)。(有關這些元素和其他 SMIL 元素的更多資訊,請參閱 9.2.2 媒體覆蓋文檔定義。par
The par
element is the basic building block of a media overlay and corresponds to a
phrase in the EPUB content document. The element provides two key pieces of information for
synchronizing content: 1) the audio clip containing the narration for the phrase; and 2) a
pointer to the associated EPUB content document fragment. The par
element uses two
media element children to represent this information: an
element and a audio
element. Because text
par
elements' media object children are timed in parallel, reading
systems render the audio clip and EPUB content document fragment at the same time, resulting in
a synchronized presentation.
該 par
元素是媒體覆蓋的基本構建塊,對應於 EPUB 內容文件中的短語。該元素為同步內容提供了兩個關鍵資訊:1)包含短語旁白的音訊剪輯;以及 2) 指向關聯的 EPUB 內容文件片段的指標。該 par
元素使用兩個媒體元素子元素來表示此資訊:一個
元素和一個 audio
元素。由於元素的媒體物件子項是並行計時的,因此 text
par
閱讀系統會同時呈現音訊剪輯和 EPUB 內容文檔片段,從而實現同步演示。
The text
element src
attribute references the associated phrase,
sentence, or other segment of the EPUB content document by its URL [url] reference. The
audio
element src
attribute similarly references the location of
the corresponding audio clip and adds the OPTIONAL clipBegin
and clipEnd
attributes to indicate a specific offset within the clip.
text
element src
屬性通過其 URL [ url] 引用來引用 EPUB 內容文檔的關聯短語、句子或其他段。element audio
src
屬性同樣引用相應音訊剪輯的位置,並添加OPTIONAL clipBegin
和 clipEnd
屬性以指示剪輯中的特定偏移量。
EPUB creators place par
elements together sequentially to form a series of phrases
or sentences. Not every element of the EPUB content document will have a corresponding
par
element in a media overlay document, only those relevant to the audio
narration.
EPUB 建立者按順序將元素放在一起 par
以形成一系列短語或句子。並非 EPUB 內容文件的每個元素在媒體疊加文檔中都有相應的 par
元素,只有與音訊旁白相關的元素。
EPUB creators can also add par
elements to seq
elements to define more
complex structures such as parts and chapters (see 9.3.2.1 Overlay structure).
EPUB 建立者還可以向 seq
元素添加 par
元素以定義更複雜的結構,例如部分和章節(參見 9.3.2.1 疊加結構)。
In this section, the EPUB content document is assumed to be an XHTML content document. While EPUB creators may use media overlays with SVG content documents,
playback behavior might not be consistent and therefore interoperability is not
guaranteed.
在本節中,假定 EPUB 內容文檔是 XHTML 內容文檔。雖然 EPUB 建立者可能會將媒體疊加用於 SVG 內容文件,但播放行為可能不一致,因此無法保證互操作性。
EPUB creators should also be aware that reading system support for playback of both
reflowable and fixed-layout EPUB content documents is not guaranteed. Differences in reading
system pagination strategies mean that some reading systems will only support media overlays
in one or the other layout format.
EPUB 建立者還應該知道,不能保證閱讀系統支援播放可重排和固定佈局的 EPUB 內容文件。閱讀系統分頁策略的差異意味著某些閱讀系統僅支援一種或另一種佈局格式的媒體疊加。
The
of a media overlay document consists of two elements: the body
element
and the par
element. The ordering of these elements represents how reading systems
render the content in the corresponding EPUB content documents during playback.seq
媒體疊加文檔由兩個元素組成: body
元素和 par
元素。這些元素的順序表示閱讀系統在播放過程中如何呈現相應 EPUB 內容文檔中的內容。seq
The par
element represents a segment of content, such as a word, phrase,
sentence, table cell, list item, image, or other identifiable piece of content in the
markup. Each element identifies both the content to display (in the
element) and
audio to synchronize (in the text
element) during playback.audio
該 par
元素表示內容段,例如標記中的單詞、短語、句子、表格單元格、清單項、圖像或其他可識別的內容片段。每個元素都標識要在播放期間顯示的內容(在
元素中)和要同步的音訊(在 text
元素中)。audio
The seq
element represents sequences — sets of seq
and/or
par
elements that together represent a logical component of the content.
EPUB creators can use it to represent nested containers such as sections, asides,
headers, tables, lists, and footnotes. It allows EPUB creators to retain the structure
inherent in these containers in the media overlay document.
元素 seq
表示序列 — 和/或 par
元素的集合 seq
,它們共同表示內容的邏輯元件。EPUB 建立者可以使用它來表示嵌套容器,例如節、旁注、頁眉、表、清單和腳註。它允許 EPUB 建立者在媒體疊加文件中保留這些容器中固有的結構。
The seq
element MUST contain an epub:textref
attribute. As seq
elements do not
provide synchronization instructions, this attribute allows a reading system to match
the fragment to a location in the text.
元素 seq
必須包含屬性 epub:textref
。由於 seq
元素不提供同步指令,因此此屬性允許閱讀系統將片段與文本中的位置進行匹配。
The reason for grouping structures like sections, figures, tables, and footnotes in a
seq
element is so that reading systems can identify their start and end
positions during playback. Reading systems can then offer playback options tailored to
the layout of the content, such as jumping past a long figure, turning off rendering of
page break announcements (see 9.4 Skippability and escapability), or customizing
the reading mode to suit structures such as tables.
將 seq
元素中的節、圖、表和腳注等結構分組的原因是,閱讀系統可以在播放過程中識別其開始和結束位置。然後,閱讀系統可以提供針對內容佈局量身定製的播放選項,例如跳過長圖、關閉分頁公告的呈現(參見 9.4 可跳過性和可轉載性)或自定義閱讀模式以適應表格等結構。
Both the epub:textref
attribute and the
element's text
src
attribute may contain a URL-fragment string that references a specific part (e.g., an
element via its ID) of the associated EPUB content document.
epub:textref
屬性和
元素 text
src
的屬性都可以包含一個 URL 片段字串,該字串引用關聯 EPUB 內容文件的特定部分(例如,通過其 ID 的元素)。
For XHTML and SVG content documents, the URL-fragment string
SHOULD be a reference to a specific element via its ID, or an SVG Fragment
Identifier [svg], respectively.
對於 XHTML 和 SVG 內容文件,URL-fragment 字串應分別通過其 ID 或 SVG 片段識別碼 [ svg] 對特定元素進行引用。
EPUB creators MAY use other fragment identifier schemes, but reading systems may not
support such identifiers.
EPUB 建立者可以使用其他片段標識符方案,但讀取系統可能不支援此類標識符。
This section is non-normative.
本節是非規範性的。
The granularity level of the media overlay depends on how EPUB creators mark up the
EPUB content document and the type of fragment identifier they use in the
elements' text
src
attributes and the
elements' seq
epub:textref
attrbutes. For example, when referencing [html] elements, if the finest level of markup is
at the paragraph level, then that is the finest possible level for media overlay
synchronization. Likewise, if sub-paragraph markup is available, such as [html] span
element representing phrases or sentences, then finer granularity is possible in the media
overlay. Finer granularity gives users more precise results for synchronized playback when
navigating by word or phrase and when searching the text but increases the file size of the
media overlay documents. Fragment identifier schemes that do not rely on the presence of
elements could provide even finer granularity, where supported.
媒體疊加的粒度級別取決於 EPUB 建立者標記 EPUB 內容文檔的方式,以及他們在
元素 text
src
屬性和
元素 seq
epub:textref
屬性中使用的片段標識符類型。例如,在引用 [ html] 元素時,如果標記的最精細級別位於段落級別,則這是媒體疊加同步的最佳級別。同樣,如果子段落標記可用,例如表示短語或句子的 [ html] span
元素,則媒體疊加中可以實現更精細的粒度。更精細的粒度為使用者提供了更精確的結果,以便在按單詞或短語導航以及搜索文本時同步播放,但會增加媒體疊加文檔的檔大小。不依賴於元素存在的片段標識符方案可以在支持的情況下提供更精細的粒度。
This specification allows the use of text-to-speech (TTS) — the rendering of the textual
content of an EPUB publication as artificial human speech using a synthesized voice — in
addition to pre-recorded audio clips.
除了預先錄製的音訊剪輯外,此規範還允許使用文本轉語音 (TTS) — 使用合成語音將 EPUB 出版物的文字內容呈現為人工人類語音。
When a media overlay
element omits its par
element, its audio
element may be
rendered in reading systems via TTS. If the text fragment is not appropriate for TTS
rendering (e.g., is not a text element and/or has no text fallback), this may produce
unexpected results.text
當媒體疊加
元素省略其 par
元素時,其 audio
元素可以通過 TTS 在閱讀系統中呈現。如果文本片段不適合 TTS 呈現(例如,不是文本元素和/或沒有文本回退),則可能會產生意外結果。text
See EPUB 3 Text-to-Speech Support [epub-tts-10] for
more information about using TTS technologies in EPUB publications.
有關在 EPUB 出版物中使用 TTS 技術的詳細資訊,請參見 EPUB 3 文本轉語音支援 [ epub-tts-10]。
To express structural semantics in media overlay documents, EPUB creators MAY specify the
attribute on epub:type
, par
, and
seq
elements.body
為了在媒體疊加文檔中表達結構語義,EPUB 建立者可以指定、 par
和 seq
元素的 body
屬性。epub:type
The epub:type
attribute facilitates reading system behavior appropriate for the
semantic type(s) indicated. Examples of these behaviors are skippability and escapability and table reading mode [epub-rs-33].
該 epub:type
屬性有助於讀取適合所指示語義類型的系統行為。這些行為的示例包括可跳過性和可逃避性以及讀表模式 [ epub-rs-33]。
Media overlay documents MAY use the applicable vocabulary
association mechanisms for the epub:type
attribute to define additional
semantics.
媒體疊加文件可以使用 epub:type
屬性的適用詞彙關聯機制來定義其他語義。
EPUB creators MAY express visual rendering information for the currently playing EPUB content document element in a CSS Style Sheet using author-defined classes.
EPUB 建立者可以使用作者定義的類在 CSS 樣式表中表達當前播放的 EPUB 內容文件元素的視覺呈現資訊。
When used, EPUB creators MUST declare the class names in the package document using the active-class
and playback-active-class
properties.
使用時,EPUB 建立者必須使用 active-class
和 playback-active-class
屬性在包文檔中聲明類名。
EPUB creators MUST define exactly one CSS class name in each property they define. Each property
MUST define a valid CSS class
name not including any selectors
[css2]. This specification does not reserve names for use with these
properties.
EPUB 建立者必須在他們定義的每個屬性中定義一個 CSS 類名。每個屬性必須定義一個有效的 CSS 類名,不包括任何選擇器 [ css2]。此規範不保留用於這些屬性的名稱。
EPUB creators MAY define any CSS properties for the specified CSS classes but must ensure that
each EPUB content document with an associated media overlay document includes a CSS
stylesheet (either embedded or linked) containing the class definitions. In the absence of such
definitions reading systems might provide their own styling, or no styling at all.
EPUB 建立者可以為指定的 CSS 類定義任何 CSS 屬性,但必須確保每個具有關聯媒體覆蓋文件的 EPUB 內容文件都包含包含類定義的 CSS 樣式表(嵌入或連結)。在沒有這樣的定義的情況下,閱讀系統可能會提供自己的樣式,或者根本沒有樣式。
EPUB creators MUST NOT use the active-class
and playback-active-class
properties in conjunction with a refines
attribute
as they always apply to the entire EPUB publication.
EPUB 建立者不得將 active-class
and playback-active-class
屬性與屬性結合使用, refines
因為它們始終適用於整個EPUB出版物。
If an EPUB content document is wholly or partially referenced by a media overlay document, then its manifest
element MUST specify a
item
media-overlay
attribute. The attribute MUST reference the ID [xml] of the manifest item
for the
corresponding media overlay document.
如果 EPUB 內容文件全部或部分被媒體覆蓋文件引用,則其清單
元素必須指定 item
media-overlay
屬性。該屬性必須引用相應媒體覆蓋文檔的清單 item
的ID[xml]。
EPUB creators MUST only specify the media-overlay
attribute on manifest
item
elements that reference EPUB content documents.
EPUB 建立者只能在引用 EPUB 內容文件的清單 item
元素上指定 media-overlay
屬性。
Manifest items for media overlay documents MUST have the media type
application/smil+xml
.
媒體疊加文檔的清單項必須具有媒體類型 application/smil+xml
。
EPUB creators MUST specify the duration of the entire EPUB publication in the package document using a
element with the meta
duration
property.
EPUB 建立者必須使用帶有該 duration
屬性的
元素在包文檔中指定整個 EPUB 發佈的持續時間。meta
In addition, EPUB creators MUST provide the duration of each media overlay document. EPUB
creators MUST use the refines
attribute to
associate each duration declaration to the corresponding manifest
.item
此外,EPUB 建立者必須提供每個媒體疊加文檔的持續時間。EPUB 建立者必須使用該 refines
屬性將每個工期聲明關聯到相應的清單
。item
The sum of the durations for each media overlay document SHOULD equal the total duration plus or minus one second.
每個媒體疊加文檔的持續時間總和應等於總持續時間加減 1 秒。
Although the sum of indivudal durations may not exactly match the total due to rounding
the times to nearest fraction of a second, a difference of greater than one second
indicates a mismatch arising from other issues.
儘管由於將時間四捨五入到最接近的幾分之一秒,單個持續時間的總和可能與總數不完全匹配,但大於一秒的差異表明其他問題引起的不匹配。
EPUB creators MAY also specify narrator
information
in the package document, as well as author-defined CSS class
names to apply to the currently playing EPUB content document element.
EPUB 建立者還可以在包文檔中指定 narrator
資訊,以及作者定義的 CSS 類名,以應用於當前播放的 EPUB 內容文件元素。
The media:
prefix is reserved
for inclusion of these properties in package metadata.
media:
前綴保留用於將這些屬性包含在包元數據中。
While reading, users may want to turn on or off certain features of the content, such as
footnotes, page numbers, or other types of secondary content. This feature is called
skippability. Reading systems use the semantic information provided by media overlay
elements' epub:type
attribute to
determine when to offer users the option of skippable features.
閱讀時,使用者可能希望打開或關閉內容的某些功能,例如腳注、頁碼或其他類型的輔助內容。此功能稱為可跳過性。閱讀系統使用媒體疊加元素 epub:type
屬性提供的語義資訊來確定何時向使用者提供可跳過功能的選項。
EPUB creators MAY use the following semantics to enable skippability:
EPUB 建立者可以使用以下語義來啟用可跳過性:
This list is non-exhaustive, however. It represents terms from the Structural Semantics
Vocabulary [epub-ssv-11] for which reading systems are most likely to offer the option
of skippability.
但是,此列表並非詳盡無遺。它代表結構語義詞彙 [ epub-ssv-11] 中的術語,閱讀系統最有可能提供可跳過性選項。
Escapable items are nested structures, such as tables and lists, that users might wish to skip
over, continuing to read from the point immediately after the nested structure. The escapability
feature differs from the skippability feature in that it does not enable or disable entire types
of items, but provides an exit from them (e.g., a user can listen to some of the content before
choosing to escape).
可迴避項是嵌套結構,例如表和清單,使用者可能希望跳過這些結構,從嵌套結構之後的點繼續讀取。esability 功能與可跳過性功能的不同之處在於,它不會啟用或禁用整個類型的專案,而是提供退出它們(例如,用戶可以在選擇轉義之前收聽某些內容)。
EPUB creators MAY use the following semantics to enable escapability:
EPUB 建立者可以使用以下語義來啟用可轉載性:
This list is non-exhaustive list, however. It represents terms from the Structural Semantics
Vocabulary [epub-ssv-11] for which reading systems are most likely to offer the
option of escapability.
但是,此列表並非詳盡無遺。它代表結構語義詞彙 [ epub-ssv-11] 中的術語,閱讀系統最有可能提供可逃避性的選項。
Sometimes escapable structures may contain escapable structures. For example, tables are
composed of many rows and cells that users may want to separately escape from. Reading
system support for escaping from such structures is complex and not well supported at this
time. EPUB creators should avoid identifying nested escapable structures until better
support is available.
有時,可迴避結構可能包含可迴避結構。例如,表由許多行和儲存格組成,使用者可能希望從中單獨轉義。對從此類結構中逃逸的讀取系統支援很複雜,目前還沒有得到很好的支援。EPUB 建立者應避免識別嵌套的可迴避結構,直到獲得更好的支援。
This section is non-normative.
本節是非規範性的。
EPUB 3 builds upon the Open Web Platform expressly so that it can leverage the structure, semantics and,
by extension, accessibility built into its underlying technologies.
EPUB 3 明確地建立在開放 Web 平台的基礎上,因此它可以利用其底層技術中內置的結構、語義和可訪問性。
The requirements and practices for creating accessible web content have already been documented in the
W3C's Web Content Accessibility Guidelines (WCAG) [wcag2].
These guidelines also form the basis for defining accessibility in EPUB publications.
創建可訪問的 Web 內容的要求和實踐已經記錄在 W3C 的 Web 內容可存取性指南 (WCAG) [ wcag2] 中。這些指南也構成了在 EPUB 出版物中定義可訪問性的基礎。
As the current WCAG guidelines (version 2) are heavily focused on web pages, a separate specification, EPUB Accessibility [epub-a11y-11], defines how to apply the standard
to EPUB publications. It also adds EPUB-specific requirements and recommendations for metadata,
pagination, and media overlays.
由於當前的 WCAG 指南(第 2 版)主要關注網頁,因此單獨的規範 EPUB 可訪問性 [ epub-a11y-11] 定義了如何將該標準應用於 EPUB 出版物。它還添加了針對元數據、分頁和媒體疊加的 EPUB 特定要求和建議。
This specification recommends that EPUB publications conform to the accessibility
requirements defined in [epub-a11y-11]. A benefit of following this recommendation is
that it helps to ensure that EPUB publications meet the accessibility requirements legislated in
jurisdictions around the world.
本規範建議 EPUB 出版物符合 [ epub-a11y-11] 中定義的可訪問性要求。遵循此建議的一個好處是,它有助於確保 EPUB 出版物符合世界各地司法管轄區立法的可訪問性要求。
EPUB creators, however, should look beyond legal imperatives and treat accessibility as a requirement
for all their content. The more accessible that EPUB publications are, the greater the potential
audience for them.
然而,EPUB 創作者應該超越法律要求,將可訪問性視為其所有內容的要求。EPUB 出版物越容易獲得,它們的潛在受眾就越大。
This specification does not integrate the accessibility requirements to allow them to adapt and
evolve independent of the EPUB specification — accessibility practices often need more frequent
updating. The accessibility specification is also intended for use with past, present, and future
versions of EPUB. The approach of a separate specification ensures that the evolution of EPUB does
not lock accessibility in time (i.e., it allows producers of older versions of EPUB to reference the
latest accessibility requirements).
該規範沒有集成可訪問性要求,以允許它們獨立於 EPUB 規範進行調整和發展 - 可訪問性實踐通常需要更頻繁的更新。輔助功能規範還適用於 EPUB 的過去、現在和未來版本。單獨規範的方法確保了 EPUB 的演變不會及時鎖定可訪問性(即,它允許舊版本 EPUB 的生產者參考最新的可訪問性要求)。
This section is non-normative.
本節是非規範性的。
The particularity of an EPUB publication is its structure. The EPUB format provides a means of
representing, packaging, and encoding structured and semantically enhanced web
content — including HTML, CSS, SVG, JavaScript, and other resources — for
distribution in a single-file container.
EPUB 出版物的特殊性在於其結構。EPUB 格式提供了一種表示、打包和編碼結構化和語義增強的 Web 內容(包括 HTML、CSS、SVG、JavaScript 和其他資源)的方法,以便在單個檔容器中分發。
This means that EPUB 3's security and privacy issues are primarily linked to the features of those
formats, and closely mirror the threats presented by web content.
這意味著 EPUB 3 的安全和隱私問題主要與這些格式的功能有關,並且密切反映了 Web 內容帶來的威脅。
Although content risks are often equated with deliberately malicious authoring intent, EPUB creators need to be aware that many practices followed with the best of intentions may expose
users to privacy and security issues. The rest of this section explores the risk model of EPUB 3
with the aim of helping EPUB creators recognize and mitigate these risks.
儘管內容風險通常等同於蓄意的惡意創作意圖,但 EPUB 建立者需要意識到,許多出於最佳意圖的做法可能會使用戶面臨隱私和安全問題。本節的其餘部分探討了 EPUB 3 的風險模型,旨在説明 EPUB 建立者識別和減輕這些風險。
For the risks associated with reading systems, refer to the security and privacy section of
[epub-rs-33].
有關與讀取系統相關的風險,請參閱 [ epub-rs-33] 的安全和隱私部分。
This section is non-normative.
本節是非規範性的。
EPUB publications pose a variety of privacy and security threats to unsuspecting users. Many of
these threats intersect with web content, but EPUB also introduces its own unique methods of attack
that can be used to trick users into accessing malicious content or into providing sensitive
information. Some of the more important attack vectors that EPUB creators and users need to be
aware of include:
EPUB 出版物對毫無戒心的用戶構成各種隱私和安全威脅。其中許多威脅與 Web 內容相交,但 EPUB 還引入了自己獨特的攻擊方法,可用於誘騙使用者訪問惡意內容或提供敏感資訊。EPUB 建立者和使用者需要注意的一些更重要的攻擊媒介包括:
EPUB 3 allows some publication resources to be remotely
hosted, specifically resources whose sizes can negatively affect the downloading and
opening of the EPUB publication (e.g., audio, video, and fonts). Although helpful for users
when used as intended, these exemptions can also be used to inject malicious content into a
publication.
EPUB 3 允許遠端託管某些出版物資源,特別是其大小可能會對 EPUB 出版物的下載和打開產生負面影響的資源(例如,音訊、視頻和字體)。儘管在按預期使用時對使用者有説明,但這些豁免也可用於將惡意內容注入出版物中。
This threat is not limited to accessing content created by a bad actor. If EPUB creators
embed content from untrustworthy sources (e.g., third party audio and video), there is
always the possibility that users may receive compromised resources.
這種威脅不僅限於訪問不良行為者創建的內容。如果 EPUB 建立者嵌入來自不可信來源(例如第三方音訊和視頻)的內容,則用戶始終有可能收到受損資源。
Checking for malware and exploits at distribution time is not always reliable, either, as the
malicious content can be swapped in any time after publication, unlike resources that come
embedded in the EPUB container.
在分發時檢查惡意軟體和漏洞也並不總是可靠的,因為與嵌入在 EPUB 容器中的資源不同,惡意內容可以在發佈后的任何時間內交換。
The origin of an EPUB is both unknown to the EPUB creator
and specific to each reading system implementation. Consequently, if the EPUB creator hosts
remote resources on a web server they control, the server effectively cannot use
security features that require specifying allowable origins, such as headers for CORS, Content-Security-Policy
, or X-Frame-Options
.
EPUB 的來源既是 EPUB 建立者所不知道的,也是特定於每個閱讀系統實現的。因此,如果 EPUB 建立者在其控制的 Web 伺服器上託管遠端資源,則該伺服器實際上無法使用需要指定允許源的安全功能,例如 CORS Content-Security-Policy
或 X-Frame-Options
.
Whether intentional or not, links to external web sites and resources expose users to
potential exploits that can compromise their reading system or operating system. Although
external links will typically open in a web browser, and be subject to the browser security
model, this does not protect users from all exploits.
無論是否有意,指向外部網站和資源的鏈接都會使用戶面臨可能危及其閱讀系統或操作系統的潛在漏洞。儘管外部連結通常會在 Web 瀏覽器中打開,並受瀏覽器安全模型的約束,但這並不能保護使用者免受所有漏洞的攻擊。
Even if the intentions of the EPUB creator are not malicious, adding tracking information to
external links is problematic for user privacy as it can allow a user's activity to be
tracked without their consent.
即使 EPUB 建立者的意圖不是惡意的,向外部連結添加跟蹤資訊也會對用戶隱私造成問題,因為它可能允許在未經使用者同意的情況下跟蹤用戶的活動。
Broken-link hijacking — when a domain expires and is bought by another party to exploit the
links to it — can also lead to users being taken to resources the EPUB creator did not
intend.
斷開的連結劫持 - 當一個功能變數名稱過期並被另一方購買以利用指向它的連結時 - 也可能導致使用者被帶到 EPUB 建立者不想要的資源。
Resources embedded in the EPUB container are not immune to malicious actors, especially when
EPUB publications are obtained from untrusted sources. Resources may contain exploits or
forms that may submit sensitive information to unintended parties. Such actors may also try
to gain access to remote resources using file indirection techniques, such as symbolic
links or file aliases.
嵌入在 EPUB 容器中的資源無法免受惡意行為者的攻擊,尤其是當 EPUB 出版物是從不受信任的來源獲取時。資源可能包含漏洞利用或表單,這些漏洞或表單可能會將敏感資訊提交給非預期方。此類參與者還可能嘗試使用文件間接技術(如符號連結或文件別名)訪問遠端資源。
The use of third-party content, such as games and quizzes, may also lead to security and
privacy issues if the EPUB creator is not able to fully vet the content.
如果 EPUB 建立者無法全面審查內容,則使用第三方內容(例如遊戲和測驗)也可能導致安全和隱私問題。
When scripts can access a device's network, it provides a variety channels to exploit the
user:
當文稿可以存取裝置的網路時,它會提供各種通道來利用使用者:
Network access may allow third-party content to exploit the user even if it was not the EPUB
creator's intent.
網路訪問可能允許第三方內容利用使用者,即使這不是 EPUB 建立者的意圖。
The encryption and decryption of EPUB publications using digital rights management schemes
may allow personally identifiable information about the user, what vendors they use, and
their reading choices to be relayed to third parties.
使用數位版權管理方案對 EPUB 出版物進行加密和解密,可以將有關使用者、他們使用的供應商以及他們的閱讀選擇的個人身份資訊轉發給第三方。
The effectiveness of these attacks also often depends on tricking users into believing that the
publication they are interacting with is from a trustworthy source. These deceptions can take the
following forms:
這些攻擊的有效性通常還取決於誘騙使用者相信他們正在與之交互的出版物來自可信賴的來源。這些欺騙可以採取以下形式:
The EPUB publication may include false information about itself to trick users into believing
that it comes from a legitimate source. A malicious EPUB creator might, for example, fake
the title, authors, identifiers, and publisher for the work.
EPUB 出版物可能包含有關其自身的虛假資訊,以誘使用戶相信它來自合法來源。例如,惡意 EPUB 建立者可能會偽造作品的標題、作者、標識碼和出版商。
Although this misinformation itself does not present an immediate harm, it could lead users
to trust malicious forms, links, and other content within the EPUB publication believing it
comes from a reliable source.
儘管這種錯誤資訊本身不會造成直接傷害,但它可能會導致使用者相信 EPUB 出版物中的惡意表格、連結和其他內容,認為它們來自可靠的來源。
Malicious EPUB creators may also design their content to imitate or replicate a platform's
experience to trick users into trusting their content.
惡意 EPUB 建立者還可能設計他們的內容來模仿或複製平台的體驗,以誘騙使用者信任他們的內容。
EPUB 3 tries to avoid extending the underlying technologies it builds on, but it has introduced
some new features. The restricted scope of these features limits the threats they might pose,
however:
EPUB 3 試圖避免擴展其構建的基礎技術,但它引入了一些新功能。但是,這些功能的有限範圍限制了它們可能構成的威脅:
Content switching and multimedia control elements only allow hiding of
content and script-less control of playback in HTML. Moreover, these features,
introduced in the first release of EPUB 3.0, are deprecated
and no longer recommended for use.
內容切換和多媒體控制元素只允許隱藏內容和對 HTML 播放的無腳本控制。此外,EPUB 3.0 第一版中引入的這些功能已棄用,不再推薦使用。
The expression of structural semantics in HTML and
SVG only allows the annotation of elements.
HTML 和 SVG 中結構語義的表達只允許對元素進行註釋。
The one potential exception is the epubReadingSystem
object [epub-rs-33] that allows EPUB creators
to query information about the current reading system. EPUB creators need to be mindful that
they only use the information exposed by this object to improve the rendering of their content
(i.e., avoid using the information to profile the user and their environment).
一個潛在的例外是 epubReadingSystem
物件 [ epub-rs-33],它允許 EPUB 建立者查詢有關當前閱讀系統的資訊。EPUB 建立者需要注意,他們僅使用此對象公開的信息來改進其內容的呈現(即,避免使用該資訊來分析使用者及其環境)。
Although EPUB creators cannot prevent every method of exploiting users, they are ultimately
responsible for the secure construction of their content. That means that they need to take
precautions to limit the exposure of their EPUB publications to the types of malicious exploits described in the previous section.
儘管 EPUB 建立者無法阻止每一種剝削使用者的方法,但他們最終要對其內容的安全構建負責。這意味著他們需要採取預防措施,以限制其 EPUB 出版物暴露於上一節中描述的惡意漏洞類型。
Some practical steps include:
一些實際步驟包括:
EPUB creators also need to consider the privacy rights of users and avoid situations where they are
intentionally collecting data. Ideally, EPUB creators SHOULD NOT track their users, but this is not
realistic for all types of publishing.
EPUB 建立者還需要考慮用戶的隱私權,避免他們故意收集數據的情況。理想情況下,EPUB 建立者不應該跟蹤他們的使用者,但這對於所有類型的發佈來說並不現實。
When EPUB creators have to track users, they SHOULD obtain the approval of the user to collect
information prior to opening the EPUB publication (e.g., in educational course work). If this is not
possible, they SHOULD obtain permission when users access the EPUB publication for the first time.
EPUB creators SHOULD also allow users to opt out of tracking, and provide users the ability to
manage and delete any data that is collected about them.
當 EPUB 建立者必須跟蹤使用者時,他們應在打開 EPUB 出版物之前(例如,在教育課程作業中)獲得使用者的批准以收集資訊。如果無法做到這一點,則應在使用者首次訪問 EPUB 出版物時獲得許可。EPUB 建立者還應允許使用者退出宣告跟蹤,併為使用者提供管理和刪除收集的有關他們的任何數據的能力。
EPUB creators also need to consider the inadvertent collection of information about users. Linking to
content on a publisher's web site, or remotely hosting resources on their servers, can lead to
profiling users, especially if unique tracking identifiers are added to the URLs.
EPUB 建立者還需要考慮無意中收集有關用戶的資訊。連結到發行者網站上的內容,或在其伺服器上遠端託管資源,可能會導致對用戶進行分析,尤其是在向URL添加唯一跟蹤標識符時。
When collecting and storing user information within an EPUB publication (e.g., through the use of cookies and web
storage [html]), EPUB creators need to consider to potential for data theft by other EPUB
publications on a reading system. Although [epub-rs-33] introduces a unique origin requirement for EPUB publications,
which limits the potential for attacks, there is still a risk that reading systems will allow EPUB
publications access to shared persistent storage (e.g., older reading systems that have not been
updated and non-conforming newer reading systems). Consequently, EPUB creators SHOULD NOT store
sensitive user data in persistent storage. If EPUB creators must store sensitive data, they SHOULD
encrypt the data to prevent trivial access to it in the case of an exploit.
在 EPUB 出版物中收集和儲存使用者資訊時(例如,通過使用 cookie 和 Web 存儲 [ html]),EPUB 建立者需要考慮閱讀系統上其他 EPUB 出版物竊取數據的可能性。儘管 [ epub-rs-33] 為 EPUB 出版物引入了唯一的來源要求,這限制了攻擊的可能性,但閱讀系統仍存在允許 EPUB 出版物訪問共用持久存儲的風險(例如,尚未更新的舊閱讀系統和不合格的新閱讀系統)。因此,EPUB 建立者不應將敏感用戶數據存儲在持久性存儲中。如果 EPUB 建立者必須存儲敏感數據,他們應該對數據進行加密,以防止在發生漏洞利用時對其進行微不足道的訪問。
When publishers and vendors must use digital rights management schemes, they should prefer schemes
that do not utilize or transmit information about the user or their content to external parties to
perform encryption or decryption.
當出版商和供應商必須使用數位版權管理方案時,他們應該首選不利用或將有關使用者或其內容的信息傳輸給外部方以執行加密或解密的方案。
To maximally reduce security and privacy risks, EPUB creators SHOULD produce their EPUB publications
with the goal of long-term preservation. EPUB publications created this way are normally
self-contained, not dependent on network access, and not encrypted with digital rights management,
removing many of the possible attack vectors. [iso22424] is an example of such a preservation
format for EPUB publications. While it is understood that not all EPUB creators can achieve these
levels of self-containment, following as many of these practices as possible will still benefit
overall user privacy and security.
為了最大限度地降低安全和隱私風險,EPUB 建立者應以長期保存為目標製作其 EPUB 出版物。以這種方式創建的 EPUB 出版物通常是獨立的,不依賴於網路訪問,並且不使用數位版權管理進行加密,從而消除了許多可能的攻擊媒介。[ iso22424] 是 EPUB 出版物的這種保存格式的一個例子。雖然可以理解,並非所有 EPUB 建立者都能實現這些級別的自我包含,但盡可能多地遵循這些做法仍將有利於整體用戶隱私和安全。
This specification contains certain features that are not yet fully supported in reading systems,
that the Working Group no longer recommends for use, or that are only retained for interoperability with
EPUB 2 reading systems. This section defines the meanings of the designations attached to these features
and their support expectations.
本規範包含某些功能,這些功能尚未在讀取系統中得到完全支援,工作組不再建議使用這些功能,或者僅保留這些功能以與EPUB 2 讀取系統進行互操作性。本節定義了附加到這些功能的名稱的含義及其支援期望。
A under-implemented feature is a feature introduced prior to EPUB 3.3 for which the
Working Group has not been able to establish enough implementation
experience.
未實現的功能是指在 EPUB 3.3 之前引入的功能,工作組無法積累足夠的實施經驗。
These features are considered important to retain despite this limitation because they are known to
be implemented by EPUB creators (i.e., their deprecation would invalidate existing content)
and/or they are integral to the content model on which EPUB is built.
儘管有此限制,但這些功能仍被認為很重要,因為它們是由 EPUB 建立者實現的(即,棄用它們將使現有內容無效)和/或它們是構建 EPUB 的內容模型的組成部分。
If this specification designates a feature as under-implemented, EPUB creators MAY use the features
as described.
如果本規範將某項功能指定為未實現,則 EPUB 建立者可以使用所述功能。
EPUB conformance checkers should alert EPUB creators to the presence of under-implemented
features when encountered in EPUB publications but must not treat their inclusion as a violation
of the standard (i.e., not emit errors or warnings).
EPUB 一致性檢查器應提醒 EPUB 建立者在 EPUB 出版物中遇到未實現的功能,但不得將其視為違反標準(即不發出錯誤或警告)。
Whether under-implemented labels are removed or replaced by deprecation in a future version of
the standard cannot be determined at this time. EPUB creators should strongly consider the
interoperability problems that may arise both now and in the future when using these
features.
目前無法確定在標準的未來版本中,是否刪除了未實現的標籤或將其替換為棄用標籤。EPUB 建立者在使用這些功能時應認真考慮現在和將來可能出現的互操作性問題。
The marking of features as under-implemented is a one-time event to account for the different
process under which EPUB was developed prior to being brought into W3C. This label will not be
used for new features developed under W3C processes.
將功能標記為未實現是一次性事件,以說明EPUB在引入W3C之前開發的不同過程。此標籤不用於在 W3C 流程下開發的新功能。
A deprecated feature is one the Working Group no longer recommends for use in this
version of the specification. Deprecated features typically have limited or no support in reading systems and/or usage in EPUB publications.
已棄用的功能是工作組不再建議在此版本的規範中使用的功能。棄用的功能通常對閱讀系統和/或 EPUB 出版物中的使用具有有限的支持或沒有支援。
If this specification designates a feature as deprecated, EPUB creators SHOULD NOT use the
feature in their EPUB publications.
如果此規範將某個功能指定為已棄用,則 EPUB 建立者不應在其 EPUB 出版物中使用該功能。
EPUB conformance checkers should alert EPUB creators to the presence of deprecated features
when encountered in EPUB publications.
EPUB 一致性檢查器應提醒 EPUB 建立者在 EPUB 出版物中遇到已棄用的功能。
The following table lists the public and
system identifiers [xml] allowed in document type declarations. [xml]
下表列出了文件類型聲明中允許的公共識別碼和系統識別碼[ xml]。[ xml格式]
EPUB creators MAY use these external identifiers only in publication resources with the listed
media types [rfc2046] specified in their manifest declarations. (Refer to 3.9 XML conformance for more information.)
EPUB 建立者只能在其清單聲明中指定了列出的媒體類型 [ rfc2046] 的發佈資源中使用這些外部標識符。(有關詳細資訊,請參閱 3.9 XML 一致性。
Media Type(s) 介質類型 | Public Identifier 公共標識碼 | System Identifier 系統標識碼 |
---|---|---|
|
-//W3C//DTD MathML 3.0//EN
|
http://www.w3.org/Math/DTD/mathml3/mathml3.dtd
|
application/x-dtbncx+xml
|
-//NISO//DTD ncx 2005-1//EN
|
http://www.daisy.org/z3986/2005/ncx-2005-1.dtd
|
image/svg+xml
|
-//W3C//DTD SVG 1.1//EN
|
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
|
This section is non-normative.
本節是非規範性的。
Structural semantics add additional meaning about the specific structural purpose an element plays.
The
attribute is used to express domain-specific semantics in EPUB content documents and media overlay documents, with the structural information it carries
complementing the underlying vocabulary.epub:type
結構語義增加了關於元素所扮演的特定結構目的的附加含義。該
屬性用於在 EPUB 內容文檔和媒體疊加文檔中表達特定於域的語義,其攜帶的結構資訊補充了基礎詞彙表。epub:type
The applied semantics refine the meaning of their containing elements without changing their nature
for assistive technologies, as happens when using the similar role
attribute [html]. The
attribute does not enhance the accessibility of the content, in other words; it only provides hints
about the purpose.
應用的語義細化了其包含元素的含義,而不會改變其輔助技術的性質,就像使用類似 role
屬性 [ html 時發生的那樣。換句話說,該屬性不會增強內容的可訪問性;它僅提供有關目的的提示。
Semantic metadata enriches content for use in publishing workflows and for author-defined purposes.
It also allows reading systems to learn more about the structure and content of a document
(e.g., to enable skippability and escapability in media
overlays).
語義元數據豐富了內容,以便在發佈工作流中使用,並用於作者定義的目的。它還允許閱讀系統更多地瞭解文檔的結構和內容(例如,在媒體疊加中啟用可跳過性和可重複性)。
This specification defines a method for adding structural semantics using the attribute
axis: instead of adding new elements, EPUB creators can append the epub:type
attribute to existing elements to add the desired semantics.
該規範定義了一種使用屬性軸添加結構語義的方法:EPUB 建立者可以將 epub:type
屬性附加到現有元素以添加所需的語義,而不是添加新元素。
epub:type
http://www.idpf.org/2007/ops
Refer to the requirements for XHTML, SVG, and media
overlays.
請參閱 XHTML、SVG 和媒體疊加的要求。
A white space-separated list of property values, with
restrictions as defined in D.1 Vocabulary association mechanisms.
以空格分隔的屬性值清單,具有 D.1 詞彙關聯機制中定義的限制。
White space is the set of characters as defined in [xml].
空格是 [ xml] 中定義的字元集。
Although the epub:type
attribute is similar in nature to the role
attribute [html], the attributes serve different purposes. The values of the
epub:type
attribute do not enhance access through assistive technologies like
screen readers as they do not map to the accessibility APIs used by these technologies. This
means that adding epub:type
values to semantically neutral elements like [html]
div
and span
does not make them any more accessible to assistive technologies. Only ARIA
roles influence how assistive technologies understand such elements.
儘管該 epub:type
屬性在性質上與 role
屬性 [ html 相似,但屬性的用途不同。該 epub:type
屬性的值不會通過輔助技術(如螢幕閱讀器)增強訪問,因為它們不映射到這些技術使用的輔助功能 API。這意味著向語義中立的元素(如 [ html] div
)添加 epub:type
值, span
並且不會使它們更容易被輔助技術訪問。只有 ARIA 角色會影響輔助技術如何理解這些元素。
The epub:type
attribute is consequently only intended for publishing semantics and
reading system enhancements. Reading systems may use epub:type
values to
provide accessibility enhancements like built-in read aloud or media overlays functionality
where interaction with assistive technologies is not essential.
因此,該 epub:type
屬性僅用於發佈語義和閱讀系統增強功能。閱讀系統可以使用 epub:type
值來提供輔助功能增強功能,例如內置的大聲朗讀或媒體覆蓋功能,其中與輔助技術的交互不是必需的。
Refer to Digital Publishing WAI-ARIA
Module [dpub-aria] for more information about accessible publishing roles.
有關可訪問發佈角色的更多資訊,請參閱數位出版 WAI-ARIA 模組 [ dpub-aria]。
The epub:type
attribute inflects semantics on the element on which it appears. Its value
is one or more white space-separated terms stemming from external vocabularies associated with the
document instance.
該 epub:type
屬性在它出現的元素上改變語義。其值是一個或多個以空格分隔的術語,這些術語源自與文檔實例關聯的外部詞彙表。
The default vocabulary for the epub:type
attribute is
the EPUB 3 Structural Semantics Vocabulary [epub-ssv-11]. EPUB creators MAY include
unprefixed terms that are not part of this vocabulary, but the preferred method for adding custom
semantics is to use prefixes for them. Refer to D.1 Vocabulary association mechanisms for more information.
該 epub:type
屬性的默認詞彙表是 EPUB 3 結構語義詞彙表 [ epub-ssv-11]。EPUB 建立者可以包含不屬於此詞彙表的無前綴術語,但添加自定義語義的首選方法是為它們使用前綴。有關詳細資訊,請參閱 D.1 詞彙關聯機制。
This appendix defines a general set of mechanisms by which attributes in this specification can reference
terms from vocabularies. It also defines EPUB-specific vocabularies for use with the attributes.
本附錄定義了一組通用機制,通過這些機制,本規範中的屬性可以引用詞彙表中的術語。它還定義了用於屬性的特定於 EPUB 的詞彙表。
This section is non-normative.
本節是非規範性的。
EPUB defines a formal method of referencing terms and properties defined in metadata and semantic
vocabularies using the property data type. The
epub:type
attribute uses this data type in EPUB content documents and
media overlay documents to add structural semantics,
for example, while the property
and rel
attributes use the data type
to define properties and relationships in the package document.
EPUB 定義了一種正式方法,用於使用屬性數據類型引用元數據和語義詞彙表中定義的術語和屬性。例如,該 epub:type
屬性在 EPUB 內容文件和媒體疊加文檔中使用此數據類型來添加結構語義,而 property
和 rel
屬性則使用該數據類型來定義包文檔中的屬性和關係。
A property value is like a CURIE [rdfa-core] — it represents a URL [url] in
compact form. The expression consists of a prefix and a reference, where the prefix — whether
literal or implied — is a shorthand mapping of a URL that typically resolves to a term
vocabulary. When a reading system converts the prefix to its URL representation and combines
with the reference, the resulting URL normally resolves to a fragment within that vocabulary
that contains human- and/or machine-readable information about the term.
屬性值類似於 CURIE [rdfa-core],它以緊湊形式表示 URL [url]。表達式由前綴和引用組成,其中前綴(無論是文字還是隱含)是 URL 的速記映射,通常解析為術語詞彙表。當閱讀系統將前綴轉換為其 URL 表示形式並與引用結合時,生成的 URL 通常會解析為該詞彙表中的片段,其中包含有關該術語的人類和/或機器可讀資訊。
To reduce the complexity for authoring, each attribute that takes a property data type
also defines a default vocabulary. Terms and properties
referenced from the default vocabularies do not include a prefix as the mapping reading systems
use to map to a URL is predefined.
為了降低創作的複雜性,採用屬性數據類型的每個屬性還定義了一個默認詞彙表。從預設詞彙表引用的術語和屬性不包含前綴,因為讀取系統用於映射到 URL 的映射是預定義的。
The power of the property data type lies in its easy extensibility. To incorporate new
terms and properties, EPUB creators only need to declare a prefix. In another authoring convenience, this specification also reserves prefixes for many commonly used
publishing vocabularies (i.e., their declaration is optional).
屬性數據類型的強大之處在於其易於擴展。要合併新的術語和屬性,EPUB 建立者只需聲明一個前綴。為了方便創作,此規範還為許多常用的發佈詞彙保留了前綴(即,它們的聲明是可選的)。
The following sections provide additional details on the property data type and
vocabulary association mechanism.
以下各節提供有關屬性數據類型和詞彙關聯機制的其他詳細資訊。
The property data type is a compact means of expressing a URL [url] and consists of
an OPTIONAL prefix separated from a reference by a colon.
屬性數據類型是表示 URL [ url] 的緊湊方式,由一個 OPTIONAL 前綴組成,該前綴與引用之間用冒號分隔。
property 財產 |
=
|
[ prefix , ":" ] , reference; [ 前綴 , “:” ] , 引用; |
|
prefix 前綴 |
=
|
? xsd:NCName ? ; ?xsd:NCName ? ; |
|
reference 參考 |
=
|
? path-relative-scheme-less-URL string [url] ? ; ?path-relative-scheme-less-URL 字符串 [ url] ? ; |
/* as defined in [url] */ /* 定義見 [ url] */ |
This specification derives the property data type from the CURIE data type defined in
[rdfa-core]. A property represents a subset of CURIEs.
此規範從 [ rdfa-core] 中定義的 CURIE 數據類型派生屬性資料類型。屬性表示 CURIE 的子集。
There are two key differences from CURIEs, however:
但是,與 CURIE 有兩個關鍵區別:
an empty reference does not represent a valid property value even
though it is valid to the definition above (i.e., a property value that only
consists of a prefix and colon is invalid).
空引用不表示有效的屬性值,即使它對上述定義有效(即,僅由前綴和冒號組成的屬性值無效)。
an empty string does not represent a valid property even though it is valid to
the definition above.
空字串不表示有效屬性,即使它對上述定義有效。
When an EPUB creator omits a prefix from a property value, the expressed reference
represents a term from the default vocabulary for that
attribute.
當 EPUB 建立者從屬性值中省略前綴時,表示的引用表示該屬性的預設詞彙表中的術語。
A default vocabulary is one that EPUB creators do not have to declare a prefix for in order to use its terms and properties where a property value is expected. EPUB creators MUST NOT add a prefix to terms and properties from a default vocabulary.
默認詞彙表是 EPUB 建立者不必聲明前綴即可使用其術語和屬性(其中需要屬性值)的詞彙表。EPUB 建立者不得從預設詞彙表向術語和屬性添加前綴。
EPUB creators MUST NOT assign a prefix to the URLs associated with these vocabularies using the
prefix
attribute.
EPUB 建立者不得使用該 prefix
屬性為與這些詞彙表關聯的 URL 分配前置綴。
Refer to the definition of each attribute that takes a property data type for more information about its default
vocabulary.
有關其預設詞彙的詳細資訊,請參閱採用屬性數據類型的每個屬性的定義。
The prefix
attribute defines prefix mappings for use in property values.
該 prefix
屬性定義用於屬性值的前置的前置。
The value of the prefix
attribute is a white space-separated list of one or more
prefix-to-URL mappings of the form:
該 prefix
屬性的值是以下形式的一個或多個前綴到 URL 映射的空格分隔清單:
prefixes 前綴 |
=
|
mapping , { whitespace, { whitespace } , mapping } ; 映射 , { 空格, { 空格 } , 映射 } ; |
|
mapping 映射 |
=
|
prefix , ":" , space , { space } , ? xsd:anyURI ? ; 前綴 , “:” , 空格 , { 空格 } , ?xsd:anyURI ? ; |
|
prefix 前綴 |
=
|
? xsd:NCName ? ; ?xsd:NCName ? ; |
|
space 空間 |
=
|
#x20 ; | |
whitespace 空白 |
=
|
(#x20 | #x9 | #xD | #xA) ; (#x20 | #x9 | #xD | #xA) ; |
With the exception of reserved prefixes, EPUB creators
MUST declare all prefixes used in a document. EPUB creators MUST only specify the
prefix
attribute on the root element [xml] of
the respective format.
除保留前綴外,EPUB 建立者必須聲明文檔中使用的所有前綴。EPUB 建立者只能在相應格式的根元素 [ xml] 上指定 prefix
屬性。
The attribute is not namespaced when used in the package document.
在包文檔中使用時,該屬性沒有命名空間。
EPUB creators MUST declare the attribute in the namespace
http://www.idpf.org/2007/ops
in EPUB content documents and media overlay documents.
EPUB 建立者必須在 EPUB 內容文檔和媒體疊加文檔的命名空間 http://www.idpf.org/2007/ops
中聲明該屬性。
Although the prefix
attribute is modeled on the identically named
prefix
attribute in [rdfa-core], EPUB creators cannot use the attributes
interchangeably. The prefix
attribute without a namespace in EPUB content
documents is the RDFa attribute.
儘管該 prefix
屬性是以 [rdfa-core] 中同名 prefix
屬性為模型的,但 EPUB 建立者不能互換使用這些屬性。EPUB 內容文件中沒有命名空間的 prefix
屬性是 RDFa 屬性。
It is common for both attributes to appear in EPUB content documents that also specify RDFa
expressions.
這兩個屬性通常都出現在同時指定 RDFa 表達式的 EPUB 內容文件中。
<html … prefix="…"
xmlns:epub="http://www.idpf.org/2007/ops"
epub:prefix="…"> …
</html>
Note that for embedded SVG, prefixes MUST be declared on the
[html] root html
element.
請注意,對於嵌入式 SVG,必須在 [ html] 根 html
元素上聲明前綴。
To avoid conflicts, EPUB creators MUST NOT use the prefix
attribute to declare a
prefix that maps to a default vocabulary.
為避免衝突,EPUB 建立者不得使用該 prefix
屬性聲明映射到默認詞彙表的前綴。
EPUB creators MUST NOT declare the prefix '_' as this specification reserves this prefix for
future compatibility with RDFa [rdfa-core] processing.
EPUB 建立者不得聲明前綴“_”,因為此規範保留了此前綴,以便將來與 RDFa [rdfa-core] 處理相容。
For future compatibility with alternative serializations of the package document, EPUB creators
MUST NOT declare a prefix for the Dublin Core /elements/1.1/ namespace [dcterms].
EPUB creators MUST use only the [dcterms] elements allowed in
the package document metadata.
為了將來與包文檔的替代序列化相容,EPUB 建立者不得聲明 Dublin Core /elements/1.1/ 命名空間 [ dcterms] 的前綴。EPUB 建立者必須僅使用包文檔元數據中允許的 [ dcterms] 元素。
Although reserved prefixes are an authoring convenience, EPUB creators should avoid
relying on them as they may cause interoperability issues. EPUB conformance checkers
will often reject new prefixes until their developers update the tools to the latest version
of the specification, for example. EPUB creators should declare all prefixes they use to
avoid such issues.
儘管保留前綴為創作提供了便利,但 EPUB 建立者應避免依賴它們,因為它們可能會導致互操作性問題。例如,EPUB 一致性檢查器通常會拒絕新的前綴,直到其開發人員將工具更新到最新版本的規範。EPUB 建立者應聲明他們使用的所有前綴以避免此類問題。
EPUB creators MAY use reserved prefixes in attributes that expect a property value without declaring them in a prefix
attribute.
EPUB 建立者可以在需要屬性值的屬性中使用保留前置綴,而無需在屬性中 prefix
聲明這些前置碼。
EPUB creators SHOULD NOT override reserved prefixes in the prefix
attribute.
EPUB 建立者不應覆蓋屬性中的 prefix
保留前綴。
The reserved prefixes an EPUB creators can use depends on the context:
EPUB 建立者可以使用的保留前綴取決於上下文:
EPUB creators MAY use the following prefixes in package document attributes without
having to declare them.
EPUB 建立者可以在包文檔屬性中使用以下前綴,而無需聲明它們。
Prefix 前綴 | URL |
---|---|
a11y 答11年 | http://www.idpf.org/epub/vocab/package/a11y/# |
dcterms DC術語 | http://purl.org/dc/terms/ |
marc 馬克 | http://id.loc.gov/vocabulary/ |
media 媒體 | http://www.idpf.org/epub/vocab/overlays/# |
onix 奧尼克斯 | http://www.editeur.org/ONIX/book/codelists/current.html# |
rendition 移交逃犯 | http://www.idpf.org/vocab/rendition/# |
schema 圖式 | http://schema.org/ |
xsd | http://www.w3.org/2001/XMLSchema# |
EPUB creators MAY use the following reserved prefixes in the epub:type
attribute without having
to declare them.
EPUB 建立者可以在 epub:type
屬性中使用以下保留前綴,而無需聲明它們。
Prefix 前綴 | URL |
---|---|
msv | http://www.idpf.org/epub/vocab/structure/magazine/# |
prism 棱鏡 | http://www.prismstandard.org/specifications/3.0/PRISM_CV_Spec_3.0.htm# |
The fields in the vocabulary definition tables have the following implicit requirements:
字彙定義表中的欄位具有以下隱式要求:
Specifies the REQUIRED type of value using [xmlschema-2] datatypes.
使用 [ xmlschema-2] 資料類型指定值的 REQUIRED 類型。
Specifies which publication resource type(s) EPUB creators MAY specify the property
on.
指定 EPUB 建立者可以指定屬性的發佈資源類型。
This field appears for properties used in the properties
attribute.
對於屬性中使用的 properties
屬性,將顯示此欄位。
Specifies the number of times EPUB creators MAY specify the property, whether globally or
attached to another element or property.
指定 EPUB 建立者可以指定屬性的次數,無論是全域指定還是附加到其他元素或屬性。
Properties with a minimum cardinality of one MUST be specified.
必須指定最小基數為1的屬性。
Describes the purpose of the property and specifies any additional usage requirements that
EPUB creators must follow.
描述屬性的用途,並指定 EPUB 建立者必須遵循的任何其他使用要求。
Provides non-normative usage examples.
提供非規範用法示例。
Identifies what EPUB creators MAY associate the property with.
標識 EPUB 建立者可以將屬性關聯到哪些內容。
This field appears for properties that define primary expressions
and subexpressions and relationships.
對於定義主表達式和子運算式以及關係的屬性,將顯示此欄位。
Specifies the name of the property as it MUST appear in the metadata.
指定屬性的名稱,因為它必須出現在元數據中。
The properties in this vocabulary are usable in the
element's meta
property
attribute.
此詞彙表中的屬性可在
元素的 meta
property
屬性中使用。
Unless indicated otherwise in its "Extends" field, the properties defined in this section are used to
define subexpressions: in other words, a
element
carrying a property defined in this section MUST have a meta
refines
attribute referencing a resource or expression being
augmented.
除非在其「擴展」欄位中另有說明,否則本節中定義的屬性用於定義子運算式:換句話說,攜帶本節中定義的屬性的
元素必須具有引用要增強的資源或表達式的 meta
refines
屬性。
The prefix URL for referencing these properties is
http://idpf.org/epub/vocab/package/meta/#
.
參考這些屬性的前置字串 URL 是 http://idpf.org/epub/vocab/package/meta/#
。
Name: 名稱: |
alternate-script
|
---|---|
Description: 描述: |
The This property is typically attached to |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
zero or more
|
Extends: 延伸: | All properties. 所有屬性。 |
Name: 名稱: |
belongs-to-collection
|
---|---|
Description: 描述: |
The It is also possible to chain these properties using the To allow reading systems to organize collections and avoid naming collisions (e.g.,
unrelated collections might share a similar name, or different editions of a
collection could be released), EPUB creators SHOULD provide an identifier that uniquely
identifies the instance of the collection. The The collection MAY more precisely define its nature by attaching a The position of the EPUB publication within the collection MAY be provided by
attaching a |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
zero or more
|
Extends: 延伸: | Applies to the EPUB publication and can refine other instances of itself. 適用於 EPUB 發佈,並可以優化其自身的其他實例。 |
Name: 名稱: |
collection-type
|
---|---|
Description: 描述: |
The When the This specification also defines the following collection types when no scheme is
specified:
Note 注意 Although reading systems are not required to support these values, specifying
them provides the option to group related EPUB publications in more meaningful
ways. |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
zero or one
|
Extends: 延伸: |
belongs-to-collection
|
Name: 名稱: |
display-seq
|
---|---|
Description: 描述: |
The This property only applies where precedence rules have not already been defined
(e.g., precedence is given to creators based on
their appearance in document order). |
Allowed value(s): 允許的值: |
xsd:unsignedInt
|
Cardinality: 基數: |
zero or one
|
Extends: 延伸: | All properties. 所有屬性。 |
Name: 名稱: |
file-as
|
---|---|
Description: 描述: | The file-as property provides the normalized form of the associated
property for sorting.該 file-as 屬性提供關聯屬性的規範化形式,以便進行排序。 |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
zero or one
|
Extends: 延伸: | All properties. 所有屬性。 |
Name: 名稱: |
group-position
|
---|---|
Description: 描述: |
The EPUB creators can attach the An EPUB publication can belong to more than one group. |
Allowed value(s): 允許的值: | A single xsd:unsignedInt or series of decimal-separated numbers (e.g.,
1 or 2.2.1 ). 單個 xsd:unsignedInt 或一系列以十進位分隔的數位(例如, 1 或 2.2.1 )。 |
Cardinality: 基數: |
zero or one
|
Extends: 延伸: | All properties. 所有屬性。 |
Name: 名稱: |
identifier-type
|
---|---|
Description: 描述: |
The When the |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
zero or one
|
Extends: 延伸: |
, dc:source
|
Use of this property is deprecated.
不推薦使用此屬性。
Refer to the meta-auth
property definition in [epubpublications-30] for more
information.
有關詳細資訊,請參閱 [ epubpublications-30] 中的 meta-auth
屬性定義。
Name: 名稱: |
role
|
---|---|
Description: 描述: |
The When the When attaching multiple roles to an individual or organization, the importance of the
roles should match the document order of their containing |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
zero or more
|
Extends: 延伸: |
, , dc:publisher
|
Name: 名稱: |
source-of
|
---|---|
Description: 描述: |
The This specification defines the |
Allowed value(s): 允許的值: |
pagination
|
Cardinality: 基數: |
zero or one
|
Extends: 延伸: |
dc:source
|
See [epub-a11y-tech-11] for information on how to provide accessible page
navigation.
請參閱 [ epub-a11y-tech-11] 以獲取有關如何提供可訪問頁面導航的資訊。
Name: 名稱: |
term
|
---|---|
Description: 描述: |
The |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
zero or one
|
Extends: 延伸: |
|
Name: 名稱: |
title-type
|
---|---|
Description: 描述: |
The When the |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
zero or one
|
Extends: 延伸: |
|
The properties in this vocabulary are usable in the metadata
element's link
rel
and properties
attributes.
此詞彙表中的屬性可用於元數據
元素 link
rel
和 properties
屬性。
The prefix URL for referencing these properties is
http://idpf.org/epub/vocab/package/link/#
.
參考這些屬性的前置字串 URL 是 http://idpf.org/epub/vocab/package/link/#
。
The following values can be used in the link
element rel
attribute to establish the relationship of the resource referenced in
the href
attribute.
link
可以在 element rel
屬性中使用以下值來建立屬性中 href
引用的資源的關係。
Name: 名稱: |
alternate
|
---|---|
Description: 描述: |
The
|
Cardinality: 基數: |
Zero or more
|
Extends: 延伸: | Only applies to the EPUB publication or collection. MUST NOT be used when the refines attribute is present.僅適用於EPUB出版物或集合。當 refines 屬性存在時,不得使用。 |
Example: 例: |
<link rel="alternate" href="package.json"
media-type="application/json-ld"/>
|
Use of the marc21xml-record
keyword is deprecated.
It is replaced by the record
keyword with the media-type
attribute value
"application/marcxml+xml
".
不推薦使用關鍵 marc21xml-record
字。它被 media-type
屬性值為 「 application/marcxml+xml
的關鍵字替換 record
」。
Refer to the marc21xml-record
property definition in [epubpublications-30] for more information.
有關詳細資訊,請參閱 [ epubpublications-30] 中的 marc21xml-record
屬性定義。
Use of the mods-record
keyword is deprecated. It
is replaced by the record
keyword with the media-type
attribute value
"application/mods+xml
".
不推薦使用關鍵 mods-record
字。它被 media-type
屬性值為 「 application/mods+xml
的關鍵字替換 record
」。
Refer to the mods-record
property definition in [epubpublications-30] for more information.
有關詳細資訊,請參閱 [ epubpublications-30] 中的 mods-record
屬性定義。
Use of the onix-record
keyword is deprecated. It
is replaced by the record
keyword with the properties attribute value onix
.
不推薦使用關鍵 onix-record
字。它被替換為 record
具有 properties 屬性值 onix
的關鍵字。
Refer to the onix-record
property definition in [epubpublications-30] for more information.
有關詳細資訊,請參閱 [ epubpublications-30] 中的 onix-record
屬性定義。
Name: 名稱: |
record
|
---|---|
Description: 描述: |
Indicates that the referenced resource is a metadata record. The media type of the record MUST be identified in the For a list of commonly linked metadata record types, refer to the EPUB Linked Metadata
Guide If the type of record cannot be identified from the media type, an identifier property can be assigned in the
|
Cardinality: 基數: |
Zero or more
|
Extends: 延伸: | Only applies to the EPUB publication or collection. MUST NOT be used when the refines attribute is present.僅適用於EPUB出版物或集合。當 refines 屬性存在時,不得使用。 |
Example: 例: |
<link rel="record" href="book/52.atom"
media-type="application/atom+xml;type=entry;profile=opds-catalog"/>
|
Name: 名稱: |
voicing
|
---|---|
Description: 描述: |
Indicates that the referenced audio file provides an aural representation of the
expression or resource (typically, the title or creator) specified by the
refines attribute. The media type of the audio file MUST be identified in the |
Cardinality: 基數: |
Zero or more
|
Extends: 延伸: | All properties. The refines attribute
MUST be present when this value is used.所有屬性。使用此值時, refines 該屬性必須存在。 |
Example: 例: |
<link refines="#title" rel="voicing" media-type="audio/mpeg"
href="title.mp3" />
|
Use of the xml-signature
keyword is deprecated.
It is not replaced by another linking method.
不推薦使用關鍵 xml-signature
字。它不會被另一種連結方法所取代。
Refer to the xml-signature
property definition in [epubpublications-30] for more information.
有關詳細資訊,請參閱 [ epubpublications-30] 中的 xml-signature
屬性定義。
Use of the xmp-record
keyword is deprecated.
不推薦使用關鍵 xmp-record
字。
Refer to the xmp-record
property definition in [epubpublications-30] for more information.
有關詳細資訊,請參閱 [ epubpublications-30] 中的 xmp-record
屬性定義。
The following values can be used in the
element's
link
properties
attribute to establish the type of record a referenced resource represents.
These values are provided for record formats that cannot be uniquely identified by their media
type.
可以在
元素 link
properties
的屬性中使用以下值來建立引用的資源所表示的記錄類型。這些值是為無法通過其媒體類型唯一標識的記錄格式提供的。
Name: 名稱: |
onix
|
---|---|
Description: 描述: | The onix property indicates the referenced resource is an ONIX record
[onix].該 onix 屬性指示引用的資源是 ONIX 記錄 [ onix]。 |
Example: 例: |
<link rel="record" href="pub/meta/nor-wood-onix.xml"
media-type="application/xml" properties="onix"/>
|
The prefix URL for referencing these properties is
http://www.idpf.org/vocab/rendition/#
.
參考這些屬性的前置字串 URL 是 http://www.idpf.org/vocab/rendition/#
。
The "rendition:
" prefix is reserved for
use with the package rendering properties and does not have to be declared in the
package document.
“ rendition:
”前綴保留用於包呈現屬性,不必在包文檔中聲明。
Unlike the other vocabularies in this appendix, the properties in the Package Rendering Vocabulary
consist of a mix of properties (expressed in
elements)
and spine overrides (expressed on meta
elements).itemref
與本附錄中的其他詞彙表不同,「包呈現詞彙表」中的屬性由屬性(以
元素表示)和主幹覆蓋(以 meta
元素表示)的混合組成。itemref
The usage requirements are also defined in 8. Layout rendering control not in this appendix.
The following table provides a map to the properties, overrides, and where they are defined.
8 中還定義了使用要求。佈局呈現控制件不在此附錄中。下表提供了屬性、替代及其定義位置的映射。
Property 財產 | Overrides 重寫 | Defined in 定義於 |
---|---|---|
rendition:layout |
|
8.2.2.1 Layout 8.2.2.1 佈局 |
rendition:orientation |
|
8.2.2.2 Orientation 8.2.2.2 方向 |
rendition:spread |
|
8.2.2.3 Synthetic spreads 8.2.2.3 合成點差 |
— |
|
8.2.2.4 Spread placement 8.2.2.4 點差放置 |
rendition:viewport (Deprecated) rendition:viewport (已棄用) |
— | 8.2.2.5 Viewport dimensions (deprecated) 8.2.2.5 視口尺寸(已棄用) |
rendition:flow |
|
8.3.1 The rendition:flow property8.3.1 rendition:flow 屬性 |
— |
|
8.3.2 The rendition:align-x-center property8.3.2 rendition:align-x-center 屬性 |
Reading system developers may introduce functionality not defined in this specification to address
reading system-specific issues rendering EPUB content documents.
讀取系統開發人員可以引入本規範中未定義的功能,以解決呈現EPUB內容文檔的讀取系統特定問題。
To facilitate this experimentation, EPUB creators MAY include custom properties and spine
overrides for use in the package document provided they do not use the rendition:
prefix.
為了便於此實驗,EPUB 建立者可以包含自定義屬性和主幹覆蓋,以便在包文檔中使用,前提是他們不使用 rendition:
前綴。
Custom properties should only address rendering issues specific to a particular reading system. This
specification should be extended to provide extensions that multiple independent reading systems can
use.
自訂屬性應僅解決特定於特定閱讀系統的呈現問題。此規範應進行擴展,以提供多個獨立讀取系統可以使用的擴展。
The properties in this vocabulary are usable in the manifest
element's item
properties
attribute.
此詞彙表中的屬性可在manifest
元素 item
properties
的屬性中使用。
The prefix URL for referencing these properties is
http://idpf.org/epub/vocab/package/item/#
.
參考這些屬性的前置字串 URL 是 http://idpf.org/epub/vocab/package/item/#
。
Name: 名稱: |
cover-image
|
---|---|
Description: 描述: | The cover-image property identifies the described publication resource as
the cover image for the EPUB publication.該 cover-image 屬性將所描述的出版物資源標識為 EPUB 出版物的封面圖像。 |
Applies to: 適用於: | All raster and vector image types 所有光柵和向量圖像類型 |
Cardinality: 基數: |
Zero or one
|
Name: 名稱: |
mathml
|
---|---|
Description: 描述: | The mathml property indicates that the described publication resource
contains one or more instances of MathML markup.該 mathml 屬性指示所描述的發佈資源包含一個或多個MathML標記實例。 |
Applies to: 適用於: |
EPUB content documents EPUB 內容文件 |
Cardinality: 基數: |
Zero or more
|
Name: 名稱: |
remote-resources
|
---|---|
Description: 描述: |
The Refer to 3.6 Resource locations for more information. |
Applies to: 適用於: | All publication resources with the capability of internal referencing
(e.g., XHTML content documents, SVG content documents,
CSS style sheets and media overlay documents). 所有具有內部引用功能的出版資源(例如,XHTML 內容文檔、SVG 內容文檔、CSS 樣式表和媒體疊加文檔)。 |
Cardinality: 基數: |
Zero or more
|
Name: 名稱: |
scripted
|
---|---|
Description: 描述: | The scripted property indicates that the described publication resource is
a scripted content document (i.e., contains scripting and/or [html] form
elements).該 scripted 屬性指示所描述的發佈資源是腳本內容文檔(即,包含腳本和/或 [ html] form 元素)。 |
Applies to: 適用於: |
EPUB content documents EPUB 內容文件 |
Cardinality: 基數: |
Zero or more
|
Name: 名稱: |
svg
|
---|---|
Description: 描述: |
The This property MUST be set when SVG markup is included directly in the resource and
MAY be set when the SVG is referenced from the resource (e.g., from an [html]
|
Applies to: 適用於: | XHTML content documents; the value is implied for SVG content documents. XHTML內容文檔;該值是 SVG 內容文件的隱含值。 |
Cardinality: 基數: |
Zero or more
|
Name: 名稱: |
switch
|
---|---|
Description: 描述: |
The |
Applies to: 適用於: | XHTML content documents. XHTML 內容文件。 |
Cardinality: 基數: |
Zero or more
|
The properties in this vocabulary are usable in the spine
element's
itemref
properties
attribute.
此詞彙表中的屬性可在 spine
元素的 itemref
properties
屬性中使用。
The prefix URL for referencing these properties is
http://idpf.org/epub/vocab/package/itemref/#
.
參考這些屬性的前置字串 URL 是 http://idpf.org/epub/vocab/package/itemref/#
。
Name: 名稱: |
page-spread-left
|
---|---|
Description: 描述: |
The The |
Name: 名稱: |
page-spread-right
|
---|---|
Description: 描述: |
The The |
The properties in this vocabulary are usable in the
element's
meta
property
attribute.
此詞彙表中的屬性可在
元素的 meta
property
屬性中使用。
The prefix URL for referencing these properties is
http://www.idpf.org/epub/vocab/overlays/#
.
參考這些屬性的前置字串 URL 是 http://www.idpf.org/epub/vocab/overlays/#
。
The prefix "media:
" is reserved for use with
properties in this vocabulary and does not have to be declared in the package document.
前綴 「 media:
保留用於此詞彙表中的屬性,不必在包文檔中聲明。
Name: 名稱: |
active-class
|
---|---|
Description: 描述: | EPUB creator-defined CSS class name to apply to the currently playing EPUB content document
element. EPUB 建立者定義的 CSS 類名,以應用於當前播放的 EPUB 內容文檔元素。 |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
Zero or one
|
Example: 例: |
<meta
property="media:active-class">-epub-media-overlay-active</meta>
|
Name: 名稱: |
duration
|
---|---|
Description: 描述: | The duration of the entire presentation or of a specific media overlay document.
The specified durations account for the audio clips known at authoring time, and so
exclude live streaming from external resources and speech synthesis. 整個演示文稿或特定媒體疊加文檔的持續時間。指定的持續時間考慮了創作時已知的音訊剪輯,因此從外部資源和語音合成中排除即時流。 |
Allowed value(s): 允許的值: |
MUST be a [smil3] clock value. |
Cardinality: 基數: | Exactly one for the EPUB publication and for each media overlay
document. EPUB 出版物和每個媒體疊加文檔正好一個。 |
Example: 例: |
<meta property="media:duration">1:36:20</meta>
|
Name: 名稱: |
narrator
|
---|---|
Description: 描述: | Name of the narrator. 講述人的姓名。 |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
Zero or more
|
Example: 例: |
<meta property="media:narrator">Joe Speaker</meta>
|
Name: 名稱: |
playback-active-class
|
---|---|
Description: 描述: | Author-defined CSS class name to apply to the EPUB content document's
document element when playback is active. 作者定義的 CSS 類名稱,用於在播放處於活動狀態時應用於 EPUB 內容文件的文件元素。 |
Allowed value(s): 允許的值: |
xsd:string
|
Cardinality: 基數: |
Zero or one
|
Example: 例: |
<meta
property="media:playback-active-class">-epub-media-overlay-playing</meta>
|
This appendix describes the prefixed CSS properties supported by EPUB.
本附錄介紹了 EPUB 支援的前綴 CSS 屬性。
The prefix definitions are no longer being synchronized with their CSS counterparts. In some
cases, the unprefixed versions of these properties now support additional values. Reading systems
may not support the new syntax with the prefixed properties, so EPUB creators are advised to use the
unprefixed versions for newer features.
前綴定義不再與其 CSS 對應項同步。在某些情況下,這些屬性的無前綴版本現在支援其他值。讀取系統可能不支援帶有前綴屬性的新語法,因此建議 EPUB 建立者使用不帶前綴的版本來獲取較新的功能。
This section describes the -epub-
prefixed properties for [css-writing-modes-3].
本節介紹 [ css-writing-modes-3] -epub-
的前綴屬性。
This property is a prefixed version of the text-orientation
property [css-writing-modes-3].
此屬性是 text-orientation
屬性 [ css-writing-modes-3] 的前綴版本。
Name: 名稱: | -epub-text-orientation |
---|---|
Value: 價值: | mixed | upright | sideways | sideways-right 混合 |直立式 |橫向 |側向右 |
For compatibility with existing content, the -epub-text-orientation
property also
supports the deprecated vertical-right
, rotate-right
, and
rotate-normal
keywords. The following table specifies the effect these have
when specified.
為了與現有內容相容,該 -epub-text-orientation
屬性還支援已 vertical-right
棄用的、 rotate-right
和 rotate-normal
關鍵字。下表指定了指定時的效果。
Deprecated value 已棄用的值 | Value to be used 要使用的值 |
---|---|
vertical-right |
mixed |
rotate-right |
sideways |
rotate-normal |
sideways |
This property is a prefixed version of the writing-mode
property
[css-writing-modes-3], with the same syntax and behavior.
此屬性是 writing-mode
屬性 [ css-writing-modes-3] 的前綴版本,具有相同的語法和行為。
Name: 名稱: | -epub-writing-mode |
---|---|
Value: 價值: | horizontal-tb | vertical-rl | vertical-lr 水平結核病 |垂直-RL |垂直-LR |
-epub-text-combine-horizontal
and -epub-text-combine
properties-epub-text-combine-horizontal
和 -epub-text-combine
屬性These properties are prefixed versions of the text-combine-upright
property [css-writing-modes-3], although -epub-text-combine
is
deprecated.
這些屬性是 text-combine-upright
屬性 [ css-writing-modes-3] 的前綴版本,但 -epub-text-combine
已棄用。
Name: 名稱: | -epub-text-combine-horizontal |
---|---|
Value: 價值: | none | all 無 |都 |
Name: 名稱: | -epub-text-combine (deprecated) -epub-text-combine (已棄用) |
---|---|
Value: 價值: | none | horizontal | horizontal <number> 無 |水準 |<number>水平 |
For compatibility with existing content, the -epub-text-combine-horizontal
and
-epub-text-combine
properties also support a number of deprecated keywords. The
following table specifies the effect these have when specified.
為了與現有內容相容, -epub-text-combine-horizontal
and -epub-text-combine
屬性還支援許多已棄用的關鍵字。下表指定了指定時的效果。
Prefixed version 帶前綴的版本 | CSS equivalent CSS 等價物 |
---|---|
-epub-text-combine-horizontal: none |
text-combine-upright: none |
-epub-text-combine-horizontal: all |
text-combine-upright: all |
-epub-text-combine: none |
text-combine-upright: none |
-epub-text-combine: horizontal |
text-combine-upright: all |
-epub-text-combine: horizontal <number> |
no equivalent 無等價物 |
This section describes the -epub-
prefixed properties (and one prefixed value) for
[css-text-3].
本節介紹 [ css-text-3] -epub-
的前綴屬性(和一個前綴值)。
This property is a prefixed version of the hyphens
property [css-text-3].
此屬性是 hyphens
屬性 [ css-text-3] 的前綴版本。
Name: 名稱: | -epub-hyphens |
---|---|
Value: 價值: | none | manual | auto | all 無 |手冊 |汽車 |都 |
For compatibility with existing content, the -epub-hyphens
property also supports
the deprecated all
keyword. The value is no longer supported in CSS and there is no
equivalent to use in its place.
為了與現有內容相容,該 -epub-hyphens
屬性還支援已棄用 all
的關鍵字。CSS 中不再支援該值,並且沒有等效的值來代替它。
This property is a prefixed version of the line-break
property [css-text-3].
此屬性是 line-break
屬性 [ css-text-3] 的前綴版本。
Name: 名稱: | -epub-line-break |
---|---|
Value: 價值: | auto | loose | normal | strict 汽車 |鬆散 |正常 |嚴格 |
This property is a prefixed version of the text-align-last
property [css-text-3].
此屬性是 text-align-last
屬性 [ css-text-3] 的前綴版本。
Name: 名稱: | -epub-text-align-last |
---|---|
Value: 價值: | auto | start | end | left | right | center | justify 汽車 |開始 |完 |左 |右 |中心 |辯護 |
This property is a prefixed version of the word-break
property [css-text-3].
此屬性是 word-break
屬性 [ css-text-3] 的前綴版本。
Name: 名稱: | -epub-word-break |
---|---|
Value: 價值: | normal | keep-all | break-all 正常 |保持全部 |全部中斷 |
This property is a prefixed value for the text-transform
property [css-text-3].
此屬性是 text-transform
屬性 [ css-text-3] 的前綴值。
Name: 名稱: | text-transform |
---|---|
Value: 價值: | -epub-fullwidth -epub-全角 |
For compatibility with existing content, the text-transform
property also supports
the deprecated -epub-fullwidth
keyword. When specified, this has the same effect as
text-transform: full-width
.
為了與現有內容相容,該 text-transform
屬性還支援已棄用 -epub-fullwidth
的關鍵字。指定后,這與 具有相同的 text-transform: full-width
效果。
This section describes the -epub-
prefixed properties for [css-text-decor-3].
本節介紹 [ css-text-décor-3] -epub-
的前綴屬性。
This property is a prefixed version of the text-emphasis-color
property [css-text-decor-3].
此屬性是 text-emphasis-color
屬性 [ css-text-décor-3] 的前綴版本。
Name: 名稱: | -epub-text-emphasis-color |
---|---|
Value: 價值: | <color> |
This property is a prefixed version of the text-emphasis-position
property [css-text-decor-3].
此屬性是 text-emphasis-position
屬性 [ css-text-décor-3] 的前綴版本。
Name: 名稱: | -epub-text-emphasis-position |
---|---|
Value: 價值: | [ over | under ] && [ right | left ] [ 上 | 下 ] && [ 右 | 左 ] |
This property is a prefixed version of the text-emphasis-style
property [css-text-decor-3].
此屬性是 text-emphasis-style
屬性 [ css-text-décor-3] 的前綴版本。
Name: 名稱: | -epub-text-emphasis-style |
---|---|
Value: 價值: | none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ]
] | <string> 無 |[ [ 填充 | 打開 ] ||[ 點 | 圓 | 雙圓 | 三角形 | 芝麻 ] ]|<string> |
This property is a prefixed version of the text-underline-position
property [css-text-decor-3].
此屬性是 text-underline-position
屬性 [ css-text-décor-3] 的前綴版本。
Name: 名稱: | -epub-text-underline-position |
---|---|
Value: 價值: | auto | [ under || [ left | right ] ] | alphabetic 汽車 |[ 在 ||[ 左 | 右 ] ]|字母 |
For compatibility with existing content, the value -epub-text-underline-position
property also supports the deprecated alphabetic
keyword. When specified, this has
the same effect as text-underline-position: auto
.
為了與現有內容相容,value -epub-text-underline-position
屬性還支援已棄用 alphabetic
的關鍵字。指定后,這與 具有相同的 text-underline-position: auto
效果。
This section is non-normative.
本節是非規範性的。
As the Safari HTML definition of the viewport meta
tag, that was used in earlier
versions of EPUB 3, is not an officially recognized standard, this specification defines a
basic syntax in order to allow EPUB creators to express width and
height dimensions for use rendering fixed-layout documents.
由於早期版本的 EPUB 3 中使用的 Safari HTML viewport meta
標籤定義不是官方認可的標準,因此此規範定義了一種基本語法,以便允許 EPUB 建立者表示寬度和高度尺寸,以便用於呈現固定佈局文檔。
The syntax of this grammar is also influenced by the parsing algorithm for the viewport
meta
tag, as defined in [css-viewport-1].
此語法的語法也受到 viewport
meta
標籤解析演算法的影響,如 [ css-viewport-1] 中所定義。
The syntax is intentionally left as generic as possible as it is not in this specification's scope to
define all the possible properties and values. It only defines the basic requirements for defining a
property and value pair as well as the possible separators between expressions.
該語法有意保持盡可能通用,因為它不在本規範的範圍內,無法定義所有可能的屬性和值。它僅定義定義屬性和值對的基本要求以及表達式之間可能的分隔符。
For fixed-layout documents, a viewport
meta
tag [html] MUST have name
and content
attributes that conform to the following definition:
對於固定佈局的文件, viewport
meta
標籤 [ html] 必須具有 name
符合以下定義的 content
屬性:
name
attribute [html] after whitespace normalization [xml] MUST be viewport
.name
屬性 [ html] 的值必須是 viewport
。The value of the content
attribute [html] after whitespace normalization [xml] MUST be of the following form:
空白規範化 [ xml] 後的 content
屬性 [ html] 的值必須採用以下格式:
viewport 視窗 | = | property, { sep, property } ; property, { sep, property } ; |
property 財產 | = | name, [ assign, value ] ; 名稱, [ 賦值, 值 ] ; |
name 名字 | = | ? character data ? ; ?字元資料 ? |
value 價值 | = | ? character data ? ; ?字元資料 ? |
sep | = |
sep-char, { sep-char } ; sep-char, { sep-char } ; |
sep-char | = | ( ";" | "," | space ) ; ( ";" |"," |空間 ) ; |
assign 分配 | = | [ space ], "=", [ space ] ; [ 空格 ], “=”, [ 空格 ] ; |
space 空間 | = | #x20 ; |
The only restriction on property names and values is that they MUST NOT contain separator characters or the assignment character.
對屬性名稱和值的唯一限制是它們不得包含分隔符或賦值字元。
The authoring requirements in this section apply after
whitespace normalization [xml] (i.e., after a reading
system strips leading and trailing whitespace and compacts all instances of multiple whitespace
within the attribute to single spaces). EPUB creators MAY include any valid ascii whitespace
[infra] in the authored tag so long as the result is valid to this definition.
本節中的創作要求適用於空格規範化 [ xml] 之後(即,在讀取系統剝離前導和尾隨空格並將屬性中多個空格的所有實例壓縮為單個空格之後)。EPUB 建立者可以在創作的標記中包含任何有效的 ascii 空格 [ infra],只要結果對此定義有效。
There are no restrictions on any other attributes allowed on the meta
element by the [html] grammar.
[ html] 語法對元素允許的 meta
任何其他屬性沒有限制。
For more information about specifying the required height
and width
properties, and their required values, refer to 8.2.2.6 Content document dimensions.
有關指定必需 height
屬性 width
及其必需值的詳細資訊,請參閱 8.2.2.6 內容文檔維度。
Although the viewport meta
tag allows EPUB creators to use properties other than
height
and width
, and to not include values for these properties,
such use is strongly discouraged. Setting other properties may have unintended consequences on
the rendering of fixed-layout documents.
儘管該 viewport meta
標記允許 EPUB 建立者使用 height
和 width
以外的屬性,並且不包含這些屬性的值,但強烈建議不要使用此類屬性。設置其他屬性可能會對固定布局文檔的呈現產生意想不到的後果。
This section is non-normative.
本節是非規範性的。
A schema for package documents is available at https://github.com/w3c/epubcheck/tree/master/src/main/resources/com/adobe/epubcheck/schema/30/package-30.nvdl.
包文檔的架構可在 https://github.com/w3c/epubcheck/tree/master/src/main/resources/com/adobe/epubcheck/schema/30/package-30.nvdl 上找到。
Validation using this schema requires a processor that supports [nvdl], [relaxng-schema],
[isoschematron] and [xmlschema-2].
使用此模式進行驗證需要支援 [ nvdl]、[ relaxng-schema]、[ isoschematron] 和 [ xmlschema-2] 的處理器。
The NVDL schema layer can be substituted by a multi-pass validation using the embedded RELAX NG
and ISO Schematron schemas alone.
NVDL 模式層可以通過單獨使用嵌入式 RELAX NG 和 ISO Schematron 模式的多通道驗證來替代。
These schemas may be updated and corrected outside of formal revisions of this specification. As
a result, they are subject to change at any time.
這些架構可能會在本規範的正式修訂版之外進行更新和更正。因此,它們可能隨時更改。
A schema for container.xml
files
is available at
https://github.com/w3c/epubcheck/tree/master/src/main/resources/com/adobe/epubcheck/schema/30/ocf-container-30.nvdl
.
container.xml
檔的架構可在 https://github.com/w3c/epubcheck/tree/master/src/main/resources/com/adobe/epubcheck/schema/30/ocf-container-30.nvdl
中找到。
Validation using this schema requires a processor that supports [relaxng-schema] and
[xmlschema-2].
使用此架構進行驗證需要支援 [relaxng-schema] 和 [ xmlschema-2] 的處理器。
The schema for encryption.xml
files is included in [xmlsec-rngschema-20130411].
文件的 encryption.xml
架構包含在 [ xmlsec-rngschema-20130411] 中。
The schema for signatures.xml
files is included in [xmlsec-rngschema-20130411].
文件的 signatures.xml
架構包含在 [ xmlsec-rngschema-20130411] 中。
A schema for media overlay documents is available at https://github.com/w3c/epubcheck/tree/main/src/master/resources/com/adobe/epubcheck/schema/30/media-overlay-30.nvdl.
媒體疊加文檔的架構可在 https://github.com/w3c/epubcheck/tree/main/src/master/resources/com/adobe/epubcheck/schema/30/media-overlay-30.nvdl 上找到。
Validation using this schema requires a processor that supports [nvdl], [relaxng-schema],
[isoschematron] and [xmlschema-2].
使用此模式進行驗證需要支援 [ nvdl]、[ relaxng-schema]、[ isoschematron] 和 [ xmlschema-2] 的處理器。
The NVDL schema layer can be substituted by a multi-pass validation using the embedded RELAX NG
and ISO Schematron schemas alone.
NVDL 模式層可以通過單獨使用嵌入式 RELAX NG 和 ISO Schematron 模式的多通道驗證來替代。
This section is non-normative.
本節是非規範性的。
Consider the following extracts of a package document and an XHTML content document:
請考慮以下包文件和 XHTML 內容文件的摘錄:
<package …>
<metadata …>
…
<link rel="record"
href="meta/data.xml"
media-type="application/marc"/>
<link rel="record"
href="https://www.example.org/meta/data2.xml"
media-type="application/marc"/>
…
</metadata>
<manifest>
…
<item id="page"
href="page.xhtml"
media-type="application/xhtml+xml"/>
<item id="nav"
href="nav.xhtml"
media-type="application/xhtml+xml"
properties="nav"/>
<item id="style"
href="style.css"
media-type="text/css"/>
<item id="font_otf"
href="fonts/font-file.otf"
media-type="font/otf"/>
<item id="font_otf_remote"
href="https://www.example.org/fonts/font-file2.otf"
media-type="font/otf"/>
<item id="font_cff"
href="fonts/font-file.cff"
media-type="font/sfnt"/>
<item id="pls"
href="speech/cmn.pls"
media-type="application/pls+xml"/>
<item id="image_1"
href="media/image_1.png"
media-type="image/png"/>
<item id="image_2"
href="media/image_2.png"
media-type="image/png"
fallback="image_desc"/>
<item id="image_desc"
href="image_desc.xhtml"
media-type="application/xhtml+xml"/>
<item id="image_3_heic"
href="media/image_3.heic"
media-type="image/heic"/>
<item id="image_3_png"
href="media/image_3.png"
media-type="image/png"/>
<item id="widget"
href="widget.xhtml"
media-type="application/xhtml+xml"/>
…
</manifest>
<spine>
…
<itemref idref="page_001"/>
<itemref idref="image_2"/>
…
</spine>
</package>
<html …>
<head …>
…
<link rel="stylesheet" type="text/css" href="style.css"/>
<link rel="pronunciation" type="application/pls+xml" href="speech/cmn.pls"/>
…
</head>
<body>
<img src="media/image1_png"/>
…
<a href="media/image_2.png">…</a>
…
<picture>
<source srcset="media/image_3.heic" type="image/heic"/>
<img src="media/image_3.png"/>
</picture>
…
<iframe src="widget.xhtml"></iframe>
…
<a href="https://www.example.org/some_content">…</a>
</body>
</html>
The various resources in the EPUB publication can be categorized as follows. (Refer to 3. Publication resources for more information about these categories.)
EPUB 出版物中的各種資源可分為以下幾類。(參見 3.有關這些類別的更多資訊的出版物資源。
meta/data.xml
The resource is a metadata record, stored in the EPUB container. It is linked via a
element in the package document metadata. It is therefore a linked resource on
the manifest plane (i.e., is not listed in the manifest). It is not
part on any other planes. link
該資源是元數據記錄,存儲在 EPUB 容器中。它通過包文檔元數據中的元素
進行連結。因此,它是清單平面上的鏈接資源(即未在清單中列出)。它不是任何其他飛機的一部分。link
https://www.example.org/meta/data2.xml
The resource is a metadata record, stored remotely. It is linked via a
element in
the package document metadata. It is therefore a linked resource on the manifest plane,
(i.e., it is not listed in the manifest). It is not part on any other planes.link
該資源是元數據記錄,遠端存儲。它通過包文檔元數據中的元素
進行連結。因此,它是清單平面上的鏈接資源(即,它未在清單中列出)。它不是任何其他飛機的一部分。link
page.xhtml
The resource is an XHTML document. It is listed in the [[EPUB spine | spine=]. It is a
publication resource on the manifest plane, a container resource, an EPUB content document on the spine plane, and is not present on the content plane. No fallback
is necessary.
該資源是一個 XHTML 文件。它列在 [[EPUB spine | spine=] 中。它是清單平面上的發佈資源、容器資源、主幹平面上的 EPUB 內容文檔,在內容平面上不存在。無需回退。
nav.xhtml
The resource is the EPUB navigation document. It is not listed in the spine. It is a
publication resource on the manifest plane, a container resource, and is not present on
either the spine plane or the content plane. No fallback is necessary.
該資源是 EPUB 導航文件。它沒有列在脊柱中。它是清單平面上的發佈資源,是容器資源,在主幹平面或內容平面上都不存在。無需回退。
style.css
The resource is a CSS file. It is not listed in the spine but is referenced from an [html]
link
element. It is a publication
resource on the manifest plane, a container resource, is not present on the spine plane, and
is a core media type resource on the content plane. No fallback is necessary.
該資源是一個 CSS 檔。它沒有在書脊中列出,而是從 [ html] link
元素引用的。它是清單平面上的發佈資源,是主幹平面上不存在的容器資源,是內容平面上的核心媒體類型資源。無需回退。
font/font-file.otf
The resource is a TrueType font file. It is not listed in the spine but is referenced from a
CSS file. It is a publication resource on the manifest plane, is a container resource, is
not present on the spine plane, and is a core media type resource on the content plane. No
fallback is necessary.
該資源是 TrueType 字體檔。它沒有在書脊中列出,而是從CSS檔中引用的。它是清單平面上的發佈資源,是容器資源,在主幹平面上不存在,是內容平面上的核心媒體類型資源。無需回退。
https://www.example.org/fonts/font-file2.otf
The resource is a TrueType font file. It is not listed in the spine but is referenced from a
CSS file. It is a publication resource on the manifest plane, is a remote resource, is
not present on the spine plane, and is a core media type resource on the content plane. No
fallback is necessary.
該資源是 TrueType 字體檔。它沒有在書脊中列出,而是從CSS檔中引用的。它是清單平面上的發佈資源,是遠端資源,在主幹平面上不存在,並且是內容平面上的核心媒體類型資源。無需回退。
font/font-file.cff
The resource is a font file in Compact Font Format. It is not listed in the spine but is
referenced from a CSS file. Its media type is not listed as a core media type. It is a publication resource on the
manifest plane, a container resource, is not present on the spine plane, and is an exempt resource on the content plane. No fallback is necessary.
該資源是緊湊字體格式的字體檔。它沒有在書脊中列出,而是從CSS檔中引用的。其媒體類型未列為核心媒體類型。它是清單平面上的發佈資源,是主幹平面上不存在的容器資源,是內容平面上的豁免資源。無需回退。
speech/cmn.pls
The resource is a Pronunciation Lexicon file. It is not listed in the spine but is referenced
from an [html] link
element. It is a
publication resource on the manifest plane, a container resource, not present on the spine
plane, and is an exempt resource on the content plane. No fallback is necessary.
該資源是發音詞典檔。它沒有在書脊中列出,而是從 [ html] link
元素引用的。它是清單平面上的發佈資源,是主幹平面上不存在的容器資源,是內容平面上的豁免資源。無需回退。
image/image_1.png
The resource is a PNG image file. It is not listed in the spine but is referenced from an
[html] img
element. It is a publication resource on the manifest plane, a container
resource, is not present on the spine plane, and is a core media type resource on the
content plane. No fallback is necessary.
資源是 PNG 影像檔。它沒有在書脊中列出,而是從 [ html] img
元素引用的。它是清單平面上的發佈資源,是主幹平面上不存在的容器資源,是內容平面上的核心媒體類型資源。無需回退。
image/image_2.png
The resource is a PNG image file. It is referenced via an [html] a
element. Because it
is referenced from a hyperlink, it must be listed in the spine. It is a publication
resource on the manifest plane, a container resource, a foreign content document on the
spine plane, and a core media type resource on the content plane. As a foreign content
document, a fallback is required, which is provided via a manifest fallback.
資源是 PNG 影像檔。它通過 [ html] a
元素引用。因為它是從超連結引用的,所以它必須列在書脊中。它是清單平面上的發佈資源、容器資源、主幹平面上的外來內容文檔和內容平面上的核心媒體類型資源。作為外部內容文檔,需要回退,該回退通過清單回退提供。
image_desc.xhtml
The resource is an XHTML document. It is the "target" of a manifest fallback so is not
explicitly listed in the spine (but it "replaces" the existing spine item when needed). It
is a publication resource on the manifest plane, a container resource, an EPUB content
document on spine plane, and, because it is not "used" when rendering another EPUB content
document, it is not present on the content plane. No fallback is necessary.
該資源是一個 XHTML 文件。它是清單回退的“目標”,因此不會在主幹中顯式列出(但在需要時,它會“替換”現有的主幹項)。它是清單平面上的發佈資源、容器資源、主幹平面上的 EPUB 內容文檔,並且由於在呈現另一個 EPUB 內容文檔時未“使用”,因此它不存在於內容平面上。無需回退。
image/image_3.heic
The resource is a High Efficiency (HEIC) image file. It is not listed in the spine but is
referenced from an [html] source
element. Its media type is not listed as a core media type. It is a publication resource on the
manifest plane, a container resource, is not present on the spine plane, and is a foreign
resource on the content plane. As a foreign resource, a fallback is required, which is
provided via the sibling [html] img
element in an [html] picture
element.
該資源是高效 (HEIC) 映像檔。它沒有在書脊中列出,而是從 [ html] source
元素引用的。其媒體類型未列為核心媒體類型。它是清單平面上的發佈資源,是容器資源,在主幹平面上不存在,在內容平面上是外部資源。作為外部資源,需要回退,該回退通過 [ html] 元素中的同級 [ html] img
picture
元素提供。
image/image_3.png
The resource is a PNG image file. It is not listed in the spine but is referenced from an
[html] img
element that is used as an intrinsic fallback of the [html] picture
element. It is a publication resource on the manifest plane, a container resource, is not
present on the spine plane, and is a core media type resource on the content plane. No
fallback is necessary.
資源是 PNG 影像檔。它沒有在主幹中列出,而是從用作 [ html] 元素的內在回退的 [ html] img
picture
元素引用。它是清單平面上的發佈資源,是主幹平面上不存在的容器資源,是內容平面上的核心媒體類型資源。無需回退。
widget.xhtml
The resource is an XHTML document. It is not listed in the spine but is referenced from an
[html] iframe
element. It is a publication resource on the manifest plane, a container
resource, is not present on spine plane, and, because it is "used" when rendering another
EPUB content document, a core media type resource on the content plane. No fallback is
necessary.
該資源是一個 XHTML 文件。它沒有在書脊中列出,而是從 [ html] iframe
元素引用的。它是清單平面上的發佈資源,是容器資源,在主幹平面上不存在,並且由於在呈現另一個 EPUB 內容文檔時“使用”它,因此是內容平面上的核心媒體類型資源。無需回退。
https://www.example.org/some_content
The resource is referenced via an [html] a
element and is not stored in the EPUB
container. Reading systems will normally open this link via a separate browser instance. It
is not on any planes defined by this specification.
該資源通過 [ html] a
元素引用,並且不存儲在 EPUB 容器中。閱讀系統通常會通過單獨的瀏覽器實例打開此連結。它不在本規範定義的任何平面上。
Additional examples on the usage of different types of resources can be found in 5.6.2.2 Examples.
有關使用不同類型資源的其他範例,請參見 5.6.2.2 示例。
Consider the following example package document:
請考慮以下範例包文件:
<package …>
…
<manifest>
…
<item id="chap01"
href="scripted01.xhtml"
media-type="application/xhtml+xml"
properties="scripted"/>
<item id="inset01"
href="scripted02.xhtml"
media-type="application/xhtml+xml"
properties="scripted"/>
<item id="slideshowjs"
href="slideshow.js"
media-type="text/javascript"/>
</manifest>
<spine …>
<itemref idref="chap01"/>
…
</spine>
…
</package>
and the following file scripted01.xhtml
:
與以下檔案 scripted01.xhtml
:
<html …>
<head>
…
<script type="text/javascript">
const te = navigator.epubReadingSystem.hasFeature("touch-events");
const te_message = te ? "passes" : "does not pass";
alert(`The reading system ${te_message} touch events to the content.`);
</script>
</head>
<body>
…
<iframe src="scripted02.xhtml" … />
…
</body>
</html>
and the following file scripted02.xhtml
:
與以下檔案 scripted02.xhtml
:
<html …>
<head>
…
<script type="text/javascript" href="slideshow.js"></script>
</head>
<body>
…
</body>
</html>
From these examples, it is true that:
從這些例子中可以看出:
the code in the script
element in the head
in
scripted01.xhtml
is a spine-level script
because the document is referenced from the spine; and
head
in scripted01.xhtml
中 script
元素中的代碼是主幹級腳本,因為文檔是從主幹引用的;和
the code in the script
element in scripted02.xhtml
is a container-constrained script because the
XHTML document it occurs in is included in scripted01.xhtml
via the
iframe
element.
script
元素中的 scripted02.xhtml
代碼是容器約束的腳本,因為它所在的 XHTML 文件是通過 iframe
元素包含在中的 scripted01.xhtml
。
This example demonstrates the use of the OCF format to contain a signed and encrypted EPUB publication within an OCF ZIP container.
此示例演示如何使用 OCF 格式在 OCF ZIP 容器中包含簽名和加密的 EPUB 出版物。
Ordered list of files in the OCF ZIP container:
OCF ZIP容器中檔案的有序清單:
mimetype
META-INF/container.xml
META-INF/signatures.xml
META-INF/encryption.xml
EPUB/As_You_Like_It.opf
EPUB/book.html
EPUB/nav.html
EPUB/images/cover.png
The contents of the mimetype
file
mimetype
檔的內容
application/epub+zip
The contents of the META-INF/container.xml
file
META-INF/container.xml
檔的內容
<?xml version="1.0"?>
<container
version="1.0"
xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile
full-path="EPUB/As_You_Like_It.opf"
media-type="application/oebps-package+xml"/>
</rootfiles>
</container>
The contents of the META-INF/signatures.xml
file
META-INF/signatures.xml
檔的內容
<signatures
xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<Signature
Id="AsYouLikeItSignature"
xmlns="http://www.w3.org/2000/09/xmldsig#">
<!--
SignedInfo is the information that is actually signed.
In this case, the SHA-1 algorithm is used to sign the
canonical form of the XML documents enumerated in the
Object element below.
-->
<SignedInfo>
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
<Reference
URI="#AsYouLikeIt">
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
…
</DigestValue>
</Reference>
</SignedInfo>
<!--
The signed value of the digest above, using the DSA
algorithm
-->
<SignatureValue>
…
</SignatureValue>
<!--
The key used to validate the signature
-->
<KeyInfo>
<KeyValue>
<DSAKeyValue>
<P>…</P>
<Q>…</Q>
<G>…</G>
<Y>…</Y>
</DSAKeyValue>
</KeyValue>
</KeyInfo>
<!--
The list of resources to sign (note that the canonical
form of XML documents is signed, while the binary form
of all other resources is used)
-->
<Object>
<Manifest
Id="AsYouLikeIt">
<Reference
URI="EPUB/As_You_Like_It.opf">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
</DigestValue>
</Reference>
<Reference URI="EPUB/book.html">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
</DigestValue>
</Reference>
<Reference
URI="EPUB/images/cover.png">
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
</DigestValue>
</Reference>
</Manifest>
</Object>
</Signature>
</signatures>
The contents of the META-INF/encryption.xml
file
META-INF/encryption.xml
檔的內容
<?xml version="1.0"?>
<encryption
xmlns="urn:oasis:names:tc:opendocument:xmlns:container"
xmlns:enc="http://www.w3.org/2001/04/xmlenc#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<!--
The RSA-encrypted AES-128 symmetric key used to encrypt
data enumerated in EncryptedData blocks below
-->
<enc:EncryptedKey
Id="EK">
<enc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
<ds:KeyInfo>
<ds:KeyName>
John Smith
</ds:KeyName>
</ds:KeyInfo>
<enc:CipherData>
<enc:CipherValue>
xyzabc…
</enc:CipherValue>
</enc:CipherData>
</enc:EncryptedKey>
<!--
Each EncryptedData block identifies a single resource
that has been encrypted using the AES-128 algorithm.
The data remains stored, in its encrypted form, in the
original file within the container.
-->
<enc:EncryptedData Id="ED1">
<enc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#kw-aes128"/>
<ds:KeyInfo>
<ds:RetrievalMethod
URI="#EK"
Type="http://www.w3.org/2001/04/xmlenc#EncryptedKey"/>
</ds:KeyInfo>
<enc:CipherData>
<enc:CipherReference
URI="EPUB/book.html"/>
</enc:CipherData>
</enc:EncryptedData>
<enc:EncryptedData Id="ED2">
<enc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#kw-aes128"/>
<ds:KeyInfo>
<ds:RetrievalMethod
URI="#EK" Type="http://www.w3.org/2001/04/xmlenc#EncryptedKey"/>
</ds:KeyInfo>
<enc:CipherData>
<enc:CipherReference
URI="EPUB/images/cover.png"/>
</enc:CipherData>
</enc:EncryptedData>
</encryption>
The contents of the EPUB/As_You_Like_It.opf
file
EPUB/As_You_Like_It.opf
檔的內容
<?xml version="1.0"?>
<package
version="3.0"
xml:lang="en"
xmlns="http://www.idpf.org/2007/opf"
unique-identifier="pub-id">
<metadata
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier
id="pub-id">
urn:uuid:B9B412F2-CAAD-4A44-B91F-A375068478A0
</dc:identifier>
<dc:language>
en
</dc:language>
<dc:title>
As You Like It
</dc:title>
<dc:creator
id="creator">
William Shakespeare
</dc:creator>
<meta
property="dcterms:modified">
2000-03-24T00:00:00Z
</meta>
<dc:publisher>
Project Gutenberg
</dc:publisher>
<dc:date>
2000-03-24
</dc:date>
<meta
property="dcterms:dateCopyrighted">
9999-01-01
</meta>
<dc:identifier
id="isbn13">
urn:isbn:9780741014559
</dc:identifier>
<dc:identifier
id="isbn10">
0-7410-1455-6
</dc:identifier>
<link
rel="xml-signature"
href="../META-INF/signatures.xml#AsYouLikeItSignature"/>
</metadata>
<manifest>
<item id="r4915"
href="book.html"
media-type="application/xhtml+xml"/>
<item id="r7184"
href="images/cover.png"
media-type="image/png"/>
<item id="nav"
href="nav.html"
media-type="application/xhtml+xml"
properties="nav"/>
</manifest>
<spine>
<itemref
idref="r4915"/>
</spine>
</package>
The following are examples of allowed clock values:
以下是允許的時鐘值的範例:
5:34:31.396
= 5 hours, 34 minutes, 31 seconds, and 396 milliseconds
5:34:31.396
= 5 小時 34 分 31 秒和 396 毫秒
124:59:36
= 124 hours, 59 minutes, and 36 seconds
124:59:36
= 124 小時 59 分 36 秒
0:05:01.2
= 5 minutes, 1 second, and 200 milliseconds
0:05:01.2
= 5 分 1 秒和 200 毫秒
0:00:04
= 4 seconds 0:00:04
= 4 秒
09:58
= 9 minutes and 58 seconds
09:58
= 9 分 58 秒
00:56.78
= 56 seconds and 780 milliseconds
00:56.78
= 56 秒和 780 毫秒
76.2s
= 76.2 seconds = 76 seconds and 200 milliseconds
76.2s
= 76.2 秒 = 76 秒 200 毫秒
7.75h
= 7.75 hours = 7 hours and 45 minutes
7.75h
= 7.75 小時 = 7 小時 45 分鐘
13min
= 13 minutes 13min
= 13 分鐘
2345ms
= 2345 milliseconds
2345ms
= 2345 毫秒
12.345
= 12 seconds and 345 milliseconds
12.345
= 12 秒 345 毫秒
This appendix registers the media type application/oebps-package+xml
for the EPUB
package document. This registration supersedes RFC4839 (see https://www.rfc-editor.org/rfc/rfc4839).
本附錄註冊了 EPUB 包文檔的介質類型 application/oebps-package+xml
。此註冊取代RFC4839(見 https://www.rfc-editor.org/rfc/rfc4839)。
The package document is an XML file that describes an EPUB publication. It identifies the resources
in the EPUB publication and provides metadata information. The package document and its related
specifications are maintained and defined by the World Wide Web
Consortium (W3C).
包文檔是描述 EPUB 發佈的 XML 檔。它標識 EPUB 出版物中的資源並提供元數據資訊。軟體包文檔及其相關規範由萬維網聯合會 (W3C) 維護和定義。
application
oebps-package+xml
None. 沒有。
None. 沒有。
8bit if UTF-8; binary if UTF-16.
如果 UTF-8,則為 8bit;二進位,如果UTF-16。
Package documents are in XML, represented either in UTF-8 or UTF-16. When the package
document is written in UTF-8, the file is 8bit compatible. When it is written in UTF-16, the
binary content-transfer-encoding must be used. For further details, see [rfc7303].
包文檔採用 XML 格式,以 UTF-8 或 UTF-16 表示。當包文檔以UTF-8編寫時,該檔與8位相容。當它以 UTF-16 編寫時,必須使用二進位 content-transfer-encoding。有關詳細資訊,請參閱 [ rfc7303]。
Package documents contain well-formed XML conforming to the XML 1.0 specification.
包文檔包含符合 XML 1.0 規範的格式正確的 XML。
Clearly, it is possible to author malicious files which, for example, contain malformed data.
Most XML parsers protect themselves from such attacks by rigorously enforcing
conformance.
顯然,可以創作惡意檔,例如,包含格式錯誤的數據。大多數 XML 解析器通過嚴格強制執行一致性來保護自己免受此類攻擊。
All processors that read package documents should rigorously check the size and validity of
data retrieved.
所有讀取包文檔的處理者都應嚴格檢查檢索到的數據的大小和有效性。
There is no current provision in the EPUB 3 specification for encryption, signing, or
authentication within the package document format.
EPUB 3 規範中沒有關於包文檔格式中的加密、簽名或身份驗證的當前規定。
None. 沒有。
This media type registration is for the EPUB package document, as described by the EPUB 3
specification located at https://www.w3.org/TR/epub-33/.
此介質類型註冊適用於 EPUB 包文檔,如位於 https://www.w3.org/TR/epub-33/ 的 EPUB 3 規範所述。
The EPUB 3 specification supersedes the Open Packaging Format 2.0.1 specification, which is
located at https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm and which also uses the application/oepbs-package+xml
media type.
EPUB 3 規範取代了開放式包裝格式 2.0.1 規範,該規範位於 https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm 中,也使用 application/oepbs-package+xml
介質類型。
This media type is in wide use for the distribution of ebooks in the EPUB format.
這種媒體類型廣泛用於分發EPUB格式的電子書。
none 沒有
.opf
TEXT 發簡訊
EPUB Canonical Fragment Identifiers are custom fragment identifiers defined for EPUB Publications. They may be used to refer to an arbitrary content within any
publication resource defined for the publication. These identifiers are defined
at https://idpf.org/epub/linking/cfi/.
EPUB 規範片段標識碼是為 EPUB 出版物定義的自定義片段標識碼。它們可用於指代為出版物定義的任何出版物資源中的任意內容。這些標識碼在 https://idpf.org/epub/linking/cfi/ 中定義。
EPUB 3 Working Group (public-epub-wg@w3.org)
EPUB 3 工作組 (public-epub-wg@w3.org)
COMMON 常見
World Wide Web Consortium (W3C)
萬維網聯盟 (W3C)
This appendix registers the media type application/epub+zip
for the EPUB Open Container
Format (OCF).
本附錄註冊了 EPUB 開放容器格式 (OCF) 的介質類型 application/epub+zip
。
An OCF ZIP container, or EPUB container, file is a container technology based on the zip archive
format (see https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT). It is used to encapsulate the
EPUB publication. OCF and its related standards are maintained and defined by the World Wide Web Consortium (W3C).
OCF ZIP容器或EPUB容器檔是基於zip存檔格式的容器技術(見 https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT)。它用於封裝 EPUB 出版物。OCF及其相關標準由萬維網聯盟(W3C)維護和定義。
application
epub+zip
None. 沒有。
None. 沒有。
OCF ZIP container files are binary files encoded in the
application/zip
media type.
OCF ZIP容器檔是以媒體類型編碼的 application/zip
二進位檔。
All processors that read OCF ZIP container files should rigorously check the size and
validity of data retrieved.
所有讀取OCF ZIP容器文件的處理器都應嚴格檢查檢索到的數據的大小和有效性。
In addition, because of the various content types that can be embedded in OCF ZIP container
files, application/epub+zip
may describe content that poses security
implications beyond those noted here. However, only in cases where the processor recognizes
and processes the additional content, or where further processing of that content is
dispatched to other processors, would security issues potentially arise. In such cases,
matters of security would fall outside the domain of this registration document.
此外,由於OCF ZIP容器檔中可以嵌入各種內容類型, application/epub+zip
因此可能會描述超出此處所述內容的安全隱患。但是,只有在處理者識別並處理其他內容,或者將該內容的進一步處理分派給其他處理者的情況下,才可能出現安全問題。在這種情況下,安全事項將不屬於本登記檔的範疇。
Security considerations that apply to application/zip
also apply to OCF ZIP
container files.
適用於的安全注意事項 application/zip
也適用於OCF ZIP容器檔。
None. 沒有。
This media type registration is for the EPUB Open Container Format (OCF), as described by the
EPUB 3 specification located at https://www.w3.org/TR/epub-33/
.
此介質類型註冊適用於 EPUB 開放容器格式 (OCF),如位於 中的 EPUB 3 規範所述 https://www.w3.org/TR/epub-33/
。
The EPUB 3 specification supersedes both RFC 4839 and the Open Container
Format 2.0.1 specification, which is located at https://idpf.org/epub/20/spec/OCF_2.0.1_draft.doc
, and which also
uses the application/epub+zip
media type.
EPUB 3 規範取代了 RFC 4839 和開放容器格式 2.0.1 規範,後者位於 https://idpf.org/epub/20/spec/OCF_2.0.1_draft.doc
,並且也使用 application/epub+zip
媒體類型。
This media type is in wide use for the distribution of ebooks in the EPUB format.
這種媒體類型廣泛用於分發EPUB格式的電子書。
0: PK 0x03 0x04
, 30: mimetype
, 38:
application/epub+zip
OCF ZIP container files are most often identified with the extension
.epub
.
OCF ZIP 容器檔最常使用擴展名 .epub
標識。
ZIP
EPUB Canonical Fragment Identifiers are custom fragment identifiers defined for EPUB Publications. They may be used to refer to an arbitrary content within any
publication resource defined for the publication. These identifiers are defined
at https://idpf.org/epub/linking/cfi/.
EPUB 規範片段標識碼是為 EPUB 出版物定義的自定義片段標識碼。它們可用於指代為出版物定義的任何出版物資源中的任意內容。這些標識碼在 https://idpf.org/epub/linking/cfi/ 中定義。
EPUB 3 Working Group (public-epub-wg@w3.org)
EPUB 3 工作組 (public-epub-wg@w3.org)
COMMON 常見
World Wide Web Consortium (W3C)
萬維網聯盟 (W3C)
audio
§9.2.2.8body
§9.2.2.4collection
§5.8.1Compression
§4.2.6.3.2.2container
§4.2.6.3.1.1dc:contributor
§5.5.4.2dc:creator
§5.5.4.3dc:date
§5.5.4.4dc:identifier
§5.5.3.1dc:language
§5.5.3.3dc:subject
§5.5.4.5dc:title
§5.5.3.2dc:type
§5.5.4.6EncryptedData
§4.2.6.3.2.1EncryptedKey
§4.2.6.3.2.1encryption
§4.2.6.3.2.1epub:type
§C.2head
§9.2.2.2item
§5.6.2itemref
§5.7.2link
§5.5.7links
§4.2.6.3.1.4manifest
§5.6.1meta
§5.5.5metadata
§5.5.1package
§5.4par
§9.2.2.6rootfile
§4.2.6.3.1.3rootfiles
§4.2.6.3.1.2seq
§9.2.2.5signatures
§4.2.6.3.6.1smil
§9.2.2.1spine
§5.7.1text
§9.2.2.7a
element a
元素
area
element area
元素
base
element base
元素
bdo
element bdo
元素
canvas
element canvas
元素
content
attribute (for meta
element)content
屬性(用於 meta
元素)
dir
attribute (for html-global
element)dir
屬性(用於 html-global
元素)
div
element div
元素
embed
element embed
元素
form
element form
元素
href
attribute (for a
element)href
屬性(用於 a
元素)
html
element html
元素
iframe
element iframe
元素
img
element img
元素
li
element li
元素
name
attribute (for meta
element)name
屬性(用於 meta
元素)
object
type object
類型
ol
element ol
元素
picture
element picture
元素
role
attribute role
屬性
rp
element rp
元素
script
element script
元素
source
element source
元素
span
element span
元素
src
attribute (for source
element)src
屬性(用於 source
元素)
src
attribute (for img
element)src
屬性(用於 img
元素)
srcset
attribute (for source
element)srcset
屬性(用於 source
元素)
srcset
attribute (for img
element)srcset
屬性(用於 img
元素)
track
element track
元素
type
attribute (for source
element)type
屬性(用於 source
元素)
video
element video
元素
list
) prepend (for list
)
svg
element svg
元素
title
element title
元素
This section is non-normative.
本節是非規範性的。
Note that this change log only identifies substantive changes since EPUB 3.2 — those that affect the
conformance of EPUB publications or are similarly noteworthy.
請注意,此更改日誌僅標識自 EPUB 3.2 以來的實質性更改,即影響 EPUB 出版物一致性或類似值得注意的更改。
For a list of all issues addressed during the revision, refer to the Working Group's issue tracker.
有關修訂期間解決的所有問題的清單,請參閱工作組的問題跟蹤器。
name
by
hasFeature
in an example. See issue 2543. hasFeature
將已棄用的 JavaScript 屬性 name
替換為範例。請參閱問題 2543。dir
attribute under-implemented due to lack of support in
reading systems. See pull request
2515.dir
屬性。請參閱拉取請求 2515。viewport meta
tag. See pull request 2503.viewport meta
標記中。請參閱拉取請求 2503。acquire
and xmp
properties after finding no
evidence these are used by publishers or reading systems. See issue 2489.acquire
和 屬性後,刪除了這些 xmp
屬性。請參閱問題 2489。epub:type
attribute is not allowed on the
head
element and metadata content in XHTML content documents. See issue 2486.head
元素和元數據內容不允許 epub:type
使用屬性。請參閱問題 2486。viewport meta
tag definition. See
pull request 2457.viewport meta
不帶值的屬性。請參閱拉取請求 2457。viewport meta
height and width not
be declared multiple times. See issue
2442.viewport meta
高度和寬度的額外要求。請參閱問題 2442。epub:type
attribute usage
definitions. See issue 2434.epub:type
細微矛盾。請參閱問題 2434。href
attribute in the package document must not be
used to reference other package document elements (i.e., to indirectly reference a resource via
its manifest or spine entry). See issue
2420.href
屬性不得用於引用其他包文檔元素(即,通過其清單或主幹條目間接引用資源)。請參閱問題 2420。text
element definition regarding using
embedded timed media. See issue
2397.text
疊加元素定義中添加了有關使用嵌入式定時媒體的註釋。請參閱問題 2397。epub:type
may be used has been
made explicit. See issue 2377.epub:type
可以使用的元素的限制已明確。請參閱問題 2377。meta
element for specifying the initial containing
boundary in fixed-layout documents is now formally defined. See issue 2292. meta
元素現已正式定義。請參閱問題 2292。title
element is restricted to
HTML elements. See issue 2355.title
元素中的標記僅限於 HTML 元素。請參閱問題 2355。authority
property and
added a note referencing the old IDPF registry. See issue 2200.authority
對財產價值的限制,並添加了引用舊 IDPF 註冊表的註釋。請參閱問題 2200。collection-type
values and replaced with a note about enabling improved handling of related
content. See issue 2071.collection-type
值的建議,並替換為有關改進相關內容處理的說明。請參閱問題 2071。epub:type
that suggest
equivalence with ARIA roles. See issue
2070.epub:type
與 ARIA 角色等效的過時要求。請參閱問題 2070。audio
element's definition by making it optional and adapted the
specification's text elsewhere to address the situation when the element is indeed not present.
See issue 1986.audio
元素的定義,使其成為可選元素,並在其他地方調整了規範的文本,以解決元素確實不存在的情況。請參閱第 1986 期。page-spread-center
property is now an alias for
spread-none
. See issue
1929.page-spread-center
屬性現在是的 spread-none
別名。請參閱第 1929 期。page-spread-center
. It is now an alias for
spread-none
. See issue
1929.page-spread-center
.它現在是的 spread-none
別名。請參閱第 1929 期。base
element to the list of discouraged XHTML constructs.
See issue 1699.base
元素添加到不鼓勵的 XHTML 構造清單中。請參閱問題 1699。file
scheme should not be used on manifest items.
See issue 1688.file
scheme的絕對URL。請參閱問題 1688。link
element can be used to link individual
metadata properties in an alternative format. See issue 1666.link
元素可用於以替代格式連結各個元數據屬性。請參閱問題 1666。application/ecmascript
as a core media type for scripts. See issue 1353.application/ecmascript
為腳本的核心媒體類型。請參閱問題 1353。link
elements to
have core media type fallbacks. See issue 1312.link
元素引用的資源具有核心媒體類型回退的要求。請參閱問題 1312。direction
attribute in 6.3.1.2 CSS requirements. See issue
1614.direction
屬性的引用。請參閱問題 1614。requiredExtensions
attribute. See issue 1087.requiredExtensions
屬性的要求。請參閱問題 1087。dc:creator
and dc:contributor
elements to have
multiple roles and allowed roles for publisher
. See issue 1129 and issue 1583dc:creator
的元素具有 dc:contributor
多個角色和允許的角色 publisher
。請參閱問題 1129 和問題 1583container.xml
, encryption.xml
and
signatures.xml
files. All schemas are considered non-normative. See issue 1566.container.xml
和 encryption.xml
signatures.xml
檔添加了元素和屬性定義。所有架構都被視為非規範性架構。請參閱問題 1566。META-INF
directory. See issue 1205.META-INF
目錄中。請參閱問題 1205。refines
attribute use fragment identifiers
to reference publication resources. See issue 1361.refines
屬性使用片段標識元引用出版物資源的建議。請參閱問題 1361。par
and
seq
ordering match the default reading order to guidance. See issue 1458par
和 seq
順序與指南的預設閱讀順序匹配的要求。請參閱問題 1458nav
elements without an epub:type
attribute are not subject to the EPUB navigation document's content model restrictions. See issue 976.epub:type
屬性的 nav
元素不受EPUB導航文檔的內容模型限制。請參閱問題 976。dc:language
elements must be well-formed
language tags. See issue 1325.dc:language
值必須是格式正確的語言標記。請參閱問題 1325。auto
value for dir
attribute and clarified the
precedence of the attribute. See issue
1491 and issue 1494.auto
屬性值 dir
並闡明瞭屬性的優先順序。請參閱問題 1491 和問題 1494。hreflang
attribute to link
elements to identify
the language of linked resources. See issue 1488.link
元素添加了 hreflang
屬性以標識鏈接資源的語言。請參閱問題 1488。epub:type
attribute does not improve the
accessibility of publications. Added pointers to the role
attribute and the
DPUB-ARIA vocabulary for accessibility.epub:type
屬性不會提高出版物的可訪問性。添加了指向 role
屬性和 DPUB-ARIA 詞彙表的指標,以實現輔助功能。toc nav
match the ordering of
EPUB content documents in the spine, and the elements within each file, has been reduced to a
recommendation. See issue 1283.toc nav
的排序相匹配的要求已簡化為建議。請參閱問題 1283。script
elements that contain data blocks are not instances of scripting. See issue 1352.script
元素不是腳本實例。請參閱問題 1352。This section is non-normative.
本節是非規範性的。
Specifications, like art, are human creations. No human has done more for EPUB than Garth Conboy, who has
been there every step of the way, from the very first OEB 1.0 in 1999 to today's EPUB 3.3. None of this
would have happened without Garth's vision, knowledge, and preternatural good nature. We dedicate EPUB 3.3 to his memory.
We are forever in your debt, Garth.
規格和藝術一樣,是人類的創造。沒有人比 Garth Conboy 為 EPUB 所做的更多,從 1999 年的第一個 OEB 1.0 到今天的 EPUB 3.3,他一路走來。如果沒有加思的遠見、知識和超自然的善良本性,這一切都不會發生。我們將 EPUB 3.3 獻給他。我們永遠虧欠你,加思。
The following members of the EPUB 3 Working Group contributed to the development of this specification:
EPUB 3 工作組的以下成員為本規範的制定做出了貢獻:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in: