這是用戶在 2024-6-27 13:53 為 https://www.w3.org/TR/epub-33/#example-escapable-structures 保存的雙語快照頁面,由 沉浸式翻譯 提供雙語支持。了解如何保存?

Jump to Table of Contents Collapse Sidebar

EPUB 3.3 EPUB 3.3 (英语)

W3C Recommendation
W3C 建議 2023 年 5 月 25 日

More details about this document
有關此文件的更多詳細資訊
This version: 此版本:
https://www.w3.org/TR/2023/REC-epub-33-20230525/
Latest published version:
最新發佈的版本:
https://www.w3.org/TR/epub-33/
Latest editor's draft: 最新編輯草稿:
https://w3c.github.io/epub-specs/epub33/core/
History: 歷史:
https://www.w3.org/standards/history/epub-33
Commit history 提交歷史記錄
Test suite: 測試套件:
https://w3c.github.io/epub-tests/index.html
Implementation report: 執行報告:
https://w3c.github.io/epub-specs/epub33/reports/
Editors: 編輯:
Matt Garrish (DAISY Consortium)
馬特·加里什(DAISY Consortium)
Ivan Herman (W3C)
伊萬·赫爾曼 ( W3C)
Dave Cramer (Invited Expert)
Dave Cramer (特邀專家)
Feedback: 回饋:
GitHub w3c/epub-specs (pull requests, new issue, open issues)
GitHub w3c/epub-specs (拉取請求、新問題、未解決問題)
public-epub-wg@w3.org with subject line [epub-33] … message topic … (archives)
帶主題行 [epub-33] … message topic … 的 public-epub-wg@w3.org ( archives)
Errata: 勘誤表:
https://w3c.github.io/epub-specs/epub33/errata.html
This document is also available in this non-normative format:
本文檔還以以下非規範格式提供:
EPUB 3 EPUB 3 (英语)

See also translations.
另請參閱翻譯。


Abstract 抽象

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 出版物的創作要求,代表了該標準的第三次主要修訂。

Status of This Document 本文件的現狀

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 流程文檔的約束。

1. Introduction 1. 引言

1.1 Overview 1.1 概述

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 的其他規格如下:

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 的一般介紹。更改日誌中還提供了與先前版本相比的技術更改清單。

1.2 Organization 1.2 組織

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 出版物,但瞭解閱讀系統如何呈現內容有助於製作出版物,以便以最佳方式呈現給使用者。

1.3 Relationship to other specifications
1.3 與其他規範的關係

This section is non-normative.
本節是非規範性的。

Caution 謹慎

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 一致性檢查器保持最新狀態。

1.3.1 Relationship to HTML
1.3.1 與 HTML 的關係

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 內容文檔中。

1.3.2 Relationship to SVG
1.3.2 與SVG的關係

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 標準的更改,以確保他們保持流程最新。

1.3.3 Relationship to CSS
1.3.3 與CSS的關係

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 屬性,以確保對全域語言的一致支援。

1.3.4 Relationship to MathML
1.3.4 與MathML的關係

EPUB 3 only supports Presentation Markup [mathml3]. Content Markup is only allowed in structured markup annotations.
EPUB 3 僅支援表示標記 [ mathml3]。內容標記只允許在結構化標記批註中使用。

1.3.5 Relationship to SMIL
1.3.5 與SMIL的關係

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 媒體疊加文檔定義中定義的媒體疊加元素和屬性。

1.3.6 Relationship to URL
1.3.6 與 URL 的關係

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] 或更早版本),則該要求在這些資源中優先。

1.4 Terminology 1.4 術語

This specification defines the following terms specific to EPUB 3.
本規範定義了特定於 EPUB 3 的以下術語。

Note 注意

Only the first instance of a term in a section links to its definition.
只有節中術語的第一個實例連結到其定義。

codec 編 解碼 器

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.
編解碼器是指具有固有二進位格式質量的內容,例如專為最佳壓縮而設計的視頻和音訊媒體類型,或提供優化的流式處理功能。

container resource 容器資源

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 資源位置。

container root URL 容器根 URL

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 中定義的屬性。

content URL 內容 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 中定義。

core media type resource
核心介質類型資源

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 內容文檔的媒體類型。

EPUB conformance checker EPUB 一致性檢查器

An application that verifies the requirements of this specification against EPUB publications and reports on their conformance.
根據 EPUB 出版物驗證本規範要求並報告其符合性的應用程式。

EPUB container EPUB 容器
OCF ZIP container OCF ZIP容器

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 容器是同義詞。

EPUB content document EPUB 內容文件

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 內容文件,而無需提供回退。

EPUB creator EPUB 建立者

An individual, organization, or process that produces an EPUB publication.
生成 EPUB 出版物的個人、組織或流程。

Note 注意

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 Author.
此規範的早期版本將 EPUB 建立者稱為作者。

EPUB manifest (or manifest)
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

EPUB navigation document
EPUB 導航文件

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 導航文件。

EPUB publication 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 出版物通常代表單一的智力或藝術作品,但此規範不限制內容的性質。

EPUB reading system (or reading system)
EPUB 閱讀系統(或閱讀系統)

A system that processes EPUB publications for presentation to a user in a manner conformant with this specification.
處理 EPUB 出版物以符合本規範的方式呈現給用戶的系統。

EPUB spine (or spine) 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 resource 豁免資源

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 豁免資源。

file name 檔名

The name of any type of file within an OCF abstract container, whether a directory or a file within a directory.
OCF 抽象容器中任何類型的檔的名稱,無論是目錄還是目錄中的檔。

file path 檔路徑

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 派生文件路徑中指定的演算法定義。

fixed-layout document 固定版面文件

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 固定版式中所定義。

foreign content document
外國內容文件

Any publication resource referenced from a spine itemref element, or a manifest fallback chain, that is not an EPUB content document.
從主幹 itemref 元素或清單回退鏈引用的任何發佈資源,該資源不是 EPUB 內容文檔。

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 內容文檔的清單回退鏈。

Note 注意

With the exception of XHTML and SVG, all core media type resources are foreign content documents when referenced directly from the spine.
除 XHTML 和 SVG 外,所有核心媒體類型資源在直接從書脊引用時都是外來內容文檔。

foreign resource 國外資源

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 內容文檔和外部內容文檔的資源。

Note 注意

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 內容文檔中使用時被視為外來的資源類型。

linked resource 鏈接資源

A resource that is only referenced from a package document link element (i.e., not also used in the rendering of an EPUB publication.
僅從包文檔 link 元素引用的資源(即,不用於呈現EPUB 出版物。

Linked resources are not publication resources but may be stored in the EPUB container. They do not require fallbacks.
鏈接的資源不是發佈資源,但可以存儲在 EPUB 容器中。它們不需要回退。

media overlay document 媒體疊加文件

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 非編解碼器

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 等)。

OCF abstract container OCF抽象容器

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 抽象容器中所定義。

package document 包裝文件

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 發佈的元資訊,提供資源清單,並定義預設讀取順序。

publication resource 出版資源

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 資源位置中列出的資源)。

Note 注意

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 也不是發布資源,它們被視為嵌入到其中的資源的一部分。

remote resource 遠程資源

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 資源位置,了解資源位置的媒體類型特定規則。

root directory 根目錄

The root directory represents the base of the OCF abstract container file system. This directory is virtual in nature.
根目錄表示 OCF 抽象容器文件系統的基礎。此目錄本質上是虛擬的。

scripted content document
腳本內容文件

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 腳本。

SVG content document SVG 內容文件

An EPUB content document that conforms to the constraints expressed in 6.2 SVG content documents.
符合 6.2 SVG 內容文件中表示的約束的 EPUB 內容文檔。

synthetic spread 合成傳播

The rendering of two adjacent pages simultaneously on a device screen.
在設備螢幕上同時呈現兩個相鄰頁面。

top-level content document
頂級內容文件

An EPUB content document or foreign content document referenced from the spine, whether directly or via a fallback chain.
從書脊引用的 EPUB 內容文件或外部內容文檔,無論是直接引用還是通過回退鏈引用。

unique identifier 唯一標識碼

The primary identifier for an EPUB publication. The unique identifier is the value of the dc:identifier element specified by the unique-identifier attribute in the package document.
EPUB 出版物的主要標識碼。唯一標識碼是包文檔中屬性 unique-identifier 指定的 dc:identifier 元素的值。

Significant revision, abridgement, etc. of the content requires a new unique identifier.
對內容進行重大修訂、刪節等需要新的唯一標識符。

viewport 視窗

The region of an EPUB reading system in which an EPUB publication is rendered visually to a user.
EPUB 閱讀系統的區域,在其中以可視方式向用戶呈現EPUB出版物。

XHTML content document XHTML 內容文件

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 語法。

1.5 Conformance 1.5 一致性

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.
所有演算法解釋都是非規範性的。

1.6 Authoring shorthands 1.6 創作速記

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" )。

2. EPUB publication conformance
2. EPUB 出版物一致性

An EPUB publication: EPUB 出版物:

In addition, all publication resources MUST adhere to the requirements in 3. Publication resources.
此外,所有出版資源必須符合 3.出版資源。

The rest of this specification covers specific conformance details.
本規範的其餘部分涵蓋了特定的一致性詳細資訊。

2.1 Conformance checking 2.1 一致性檢查

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 發佈無效,但可能會導致互操作性問題和其他影響使用者閱讀體驗的問題。這些問題通常報告為警告。

Note 注意

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 建立者在所有情況下都無法遵循推薦的做法是有正當理由的。

3. Publication resources 3. 出版資源

3.1 Introduction 3.1 引言

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.
以下各節將更詳細地介紹這些平面。

Note 注意

Refer to H.1 Resources for a detailed example showing how resources fit into the different planes.
請參閱 H.1 資源,瞭解資源如何適應不同平面的詳細示例。

3.1.1 The manifest plane 3.1.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 manifest element.
此組中的主要資源是指定的發佈資源,這些資源是用於向用戶呈現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 link elements in the package document metadata. These elements define their nature and purpose similar to how manifest item elements define publication resource. (In this way, they are like an extension of the manifest.)
與發佈資源不同,它們未在包文檔清單中列出(即,因為它們對於呈現 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 容器內或容器外部。

Note 注意

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 出版物的一部分。

3.1.2 The spine plane 3.1.2 脊柱平面

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 清單回退。

Caution 謹慎

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 的技術要求,但在讀取系統中幾乎沒有對它們的實際支援。強烈建議不要使用它們,因為它可能導致出版物不可讀。

Note 注意

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 內容文件提供清單回退,但這不是必需的,也不常見。例如,腳本化內容文檔可以回退到不支援腳本的讀取系統的無腳本替代項。

3.1.3 The content plane 3.1.3 內容平面

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 核心介質類型。

Note 注意

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 豁免資源。

Note 注意

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 之外的所有外部資源和所有核心媒體類型資源)。

3.2 Core media types 3.2 核心媒體類型

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 介質類型 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 字體
  1. font/ttf
  2. application/font-sfnt
[truetype]  [ 真型態] TrueType fonts TrueType 字體
  1. font/otf
  2. application/font-sfnt
  3. application/vnd.ms-opentype
[opentype] [ 開放類型] OpenType fonts OpenType 字體
  1. font/woff
  2. application/font-woff
[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 文件。
  1. application/javascript
  2. application/ecmascript
  3. text/javascript
[rfc4329] Scripts. 腳本。
application/x-dtbncx+xml [opf-201]  [ OPF-201型] The legacy NCX. 舊版 NCX。
application/smil+xml Media overlays 媒體疊加 EPUB media overlay documents
EPUB 媒體疊加文檔
Note 注意

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 出版物呈現的可預測性。

3.3 Foreign resources 3.3 國外資源

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 建立者必須為外部資源提供回退,其中回退採用以下形式之一:

Note 注意

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 內部回退還提供了有關如何解釋特定元素的回退的附加資訊。

3.4 Exempt resources 3.4 豁免資源

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 建立者可以使用這些資源的任何限制。

Fonts 字體

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]。

Tracks 軌道

All audio and video tracks (e.g., [webvtt] captions, subtitles and descriptions) referenced from the [htmltrack element are exempt resources.
從 [ html] track 元素引用的所有音訊和視頻軌道(例如,[ webvtt] 字幕、字幕和描述)都是豁免資源。

Video 視頻

All video codecs referenced from the [html] video — including any child source elements — are exempt resources.
從 [ html] video 引用的所有視頻編解碼器(包括任何子 source 元素)都是免稅資源。

Note 注意

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 創作者在決定包含哪些視頻格式時,必須考慮採用範圍、播放品質和技術版稅等因素。

Note 注意

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:
除了特定於內容的豁免之外,在以下情況下,資源將被歸類為豁免資源:

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 內容文件中引用的,因此它會自動免於回退。

3.5 Resource fallbacks 3.5 資源回退

3.5.1 Manifest fallbacks 3.5.1 清單回退

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 item elements. This attribute references the ID [xml] of another manifest 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 .從給定 itemfallback 屬性開始,讀取系統可以訪問的所有引用的有序清單表示該 item 引用的完整回退鏈。此鏈還表示 EPUB 建立者的首選回退順序。

There are two cases for manifest fallbacks:
清單回退有兩種情況:

Spine 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 屬性來區分每個文檔的用途。

Content fallbacks 內容回退
Note 注意

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 鏈中元素的自引用或迴圈引用。

Note 注意

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。

3.5.2 Intrinsic fallbacks
3.5.2 內在回退

The following sections provide additional clarifications about the intrinsic fallback requirements of specific elements.
以下各節提供了有關特定元素的內在回退要求的其他說明。

3.5.2.1 HTML audio and video fallbacks
3.5.2.1 HTML audiovideo 回退

EPUB creators MUST NOT use embedded [htmlflow 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 閱讀系統)才會呈現嵌入的內容。當閱讀系統支援這些元素但不支援可用的媒體格式時,它們不會為使用者呈現嵌入的內容。

Note 注意

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.
回退要求僅適用於引用自 audiovideo 元素的音訊外部資源。視頻資源不需要回退;它們是豁免資源。

3.5.2.2 HTML img fallbacks
3.5.2.2 HTML img 回退

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 元素的子元素:

    • it MUST reference core media type resources from its src and srcset attributes, when EPUB creators specify those attributes; and
      當 EPUB 建立者指定核心媒體類型資源時,它必須從其 srcsrcset 屬性中引用核心媒體類型資源;和
    • each sibling 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]。
  • Otherwise, it MAY reference foreign resources in its src and srcset attributes provided EPUB creators define a manifest fallback.
    否則,如果 EPUB 建立者定義了清單回退,它可能會在其 srcsrcset 屬性中引用外部資源。
3.5.2.3 HTML script element
3.5.2.3 HTML script 元素

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 建立者可以包含用於腳本目的的數據塊,他們不受回退要求的約束。

Note 注意

This exemption aligns data blocks with the exemption for data files.
此豁免使數據塊與數據檔的豁免保持一致。

Note 注意

[svg] does not define data blocks as of publication, but the same exclusion would apply if a future update adds the concept.
[ svg] 在發佈時未定義數據塊,但如果將來的更新添加了該概念,則相同的排除將適用。

3.6 Resource locations 3.6 資源位置

EPUB creators MAY host the following types of publication resources outside the EPUB container:
EPUB 建立者可以在 EPUB 容器之外託管以下類型的發佈資源:

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.
無論給定資源是核心媒體類型資源還是外部資源,這些用於查找發佈資源的規則都適用。

Note 注意

Refer to the remote-resources property for more information on how to indicate that a manifest item references a remote resource.
有關如何指示清單 item 引用遠端資源的詳細資訊,請參閱該 remote-resources 屬性。

3.7 Data URLs 3.7 數據網址

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]:

Note 注意

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 編碼為核心媒體類型資源,或者使用主機格式的固有回退機制提供回退。

3.8 File URLs 3.8 檔網址

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。

3.9 XML conformance 3.9 XML一致性

Any publication resource that is an XML-based media type [rfc2046]:
任何基於 XML 的媒體類型的發佈資源 [ rfc2046]:

The above constraints apply regardless of whether the given publication resource is a core media type resource or a foreign resource.
無論給定的發佈資源是核心媒體類型資源還是外部資源,上述約束都適用。

Note 注意

[html] and [svg] are removing support for the XML base attribute [xmlbase]. EPUB creators should avoid using this feature.
[ html] 和 [ svg] 將刪除對 XML base 屬性 [ xmlbase] 的支援。EPUB 建立者應避免使用此功能。

4. Open Container Format (OCF)
4. 開放容器格式 (OCF)

4.1 Introduction 4.1 引言

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 出版物的嵌入字體進行模糊處理。

4.2 OCF abstract container
4.2 OCF抽象容器

4.2.1 Introduction 4.2.1 簡介

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 目錄中各種檔的一致性要求。

4.2.2 File and directory structure
4.2.2 檔和目錄結構

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 中的檔。

Note 注意

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] 時,更常遇到此問題。

4.2.3 File paths and file names
4.2.3 檔路徑和檔名

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+FFFEU+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

    Note 注意

    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]。

Note 注意

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] 中有關“截斷或限制字符串長度”的部分。

Note 注意

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 工具)。

4.2.4 Deriving file paths
4.2.4 派生文件路徑

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] 的術語表示):

  1. Let path be an empty list.
    讓path為空清單。
  2. Let current be file. 讓 current 成為檔。
  3. While current is not the root directory:
    雖然 current 不是根目錄:
    1. prepend the file name of current to path;
      將 current 的檔名前置到 path;
    2. set current to the parent directory of current.
      將 Current 設定為 Current 的父目錄。
  4. Return the concatenation of path using the U+002F (/) character.
    使用 U+002F (/) 字元返回路徑的串聯。

4.2.5 URLs in the OCF abstract container
4.2.5 OCF 抽象容器中的URL

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 建立者必須假定它具有以下屬性:

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 為基檔路徑解析檔路徑的結果。

Note 注意

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。

Note 注意

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:

  1. Set the container root URL to https://a.example.org/A/.
    將容器根 URL 設定為 https://a.example.org/A/

    Explanation 解釋

    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.)

  2. 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)。

    Explanation 解釋

    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).

  3. Let testURLRecord be the result of applying the URL parser to url, with base.
    讓 testURLRecord 是將 URL 解析器應用於 url 的結果,帶有 base。
  4. Let testURLStringA be the result of applying the URL Serializer to testURLRecord.
    讓 testURLStringA 是將 URL 序列化程式應用於 testURLRecord 的結果。
  5. Set the container root URL to https://b.example.org/B/.
    將容器根 URL 設定為 https://b.example.org/B/

    Explanation 解釋

    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.

  6. Set base to 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)。
  7. Set testURLRecord to be the result of applying the URL parser to url, with base.
    將 testURLRecord 設置為將 URL 解析器應用於 url 的結果,並帶有 base。
  8. Let testURLStringB be the result of applying the URL Serializer to testURLRecord.
    讓 testURLStringB 是將 URL 序列化程式應用於 testURLRecord 的結果。
  9. 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。

    Explanation 解釋

    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.

  10. 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。

    Explanation 解釋

    The presence of the first test path segments (A, respectively B) indicate that the URL doesn't leak outside the container.

  11. Return false. 返回 false。

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。

Note 注意

These constraints on URL strings mean that:
這些對 URL 字串的約束意味著:

  • relative URL strings starting with a / (U+002F) (for example, /EPUB/content.xhtml) are disallowed;
    不允許使用 /U+002F ) 開頭的相對 URL 字串(例如 /EPUB/content.xhtml );
  • relative URL strings containing more double-dot URL path segments than needed to reach the target file (for example, EPUB/../../../../config.xml) are disallowed;
    不允許使用包含比到達目標檔所需的更多的雙點 URL 路徑段的相對 URL 字串(例如 EPUB/../../../../config.xml );
  • any other absolute or relative URL string is allowed.
    允許使用任何其他絕對或相對 URL 字串。

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 字串也不會在解析后「洩漏」到容器外部(如本節的第一個註釋中所述)。然而,為了與不合規或遺留的閱讀系統和工具鏈有更好的互操作性,它們被禁止使用。

4.2.6 META-INF directory
4.2.6 META-INF 目錄

4.2.6.1 Inclusion in OCF abstract container
4.2.6.1 包含在 OCF 抽象容器中

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 保留檔中定義的檔。

4.2.6.2 Parsing URLs in the META-INF directory
4.2.6.2 解析 META-INF 目錄中的URL

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作為基礎。

4.2.6.3 Reserved files 4.2.6.3 保留檔
4.2.6.3.1 Container file (container.xml)
4.2.6.3.1 容器檔 ( container.xml

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).
從其他命名空間中刪除所有元素和屬性(包括此類元素的所有屬性和內容)后,此文件的內容必須對本節中的定義有效。

Note 注意

An XML Schema also informally defines the content of this file.
XML 架構還非正式地定義此文件的內容。

4.2.6.3.1.1 The container element
4.2.6.3.1.1 container 元素

The container element encapsulates all the information in the container.xml file.
container 元素封裝 container.xml 檔中的所有資訊。

Element Name: 元素名稱:

container

Usage: 用法:

REQUIRED root element [xml] of the container.xml file.
container.xml 檔的 REQUIRED 根元素 [ xml]。

Attributes: 屬性:
version [required]
This attribute MUST have the value "1.0".
此屬性必須具有值 “ 1.0
Content Model: 內容模型:

In this order: 依此順序:

4.2.6.3.1.2 The rootfiles element
4.2.6.3.1.2 rootfiles 元素

The rootfiles element contains a list of package documents available in the EPUB container.
rootfiles 元素包含EPUB容器中可用的包文檔清單。

Element Name: 元素名稱:

rootfiles

Usage: 用法:

REQUIRED first child of container.
必需的第一個子項 container

Attributes: 屬性:

None 沒有

Content Model: 內容模型:
4.2.6.3.1.3 The rootfile element
4.2.6.3.1.3 rootfile 元素

Each rootfile element identifies the location of one package document in the EPUB container.
每個 rootfile 元素標識一個包文檔在 EPUB 容器中的位置。

Element Name: 元素名稱:

rootfile

Usage: 用法:

As child of the rootfiles element. Repeatable.
作為 rootfiles 元素的子元素。重複。

Attributes: 屬性:
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 ” ”

Content Model: 內容模型:

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 出版物的一個呈現形式。

Note 注意

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] 以獲取有關如何捆綁多個內容呈現的更多資訊。

4.2.6.3.1.6 Examples 4.2.6.3.1.6 示例

This section is non-normative.
本節是非規範性的。

4.2.6.3.2 Encryption file (encryption.xml)
4.2.6.3.2 加密檔案 ( encryption.xml

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 檔來提供有關所用加密的資訊。

4.2.6.3.2.1 The encryption element
4.2.6.3.2.1 encryption 元素
Element Name: 元素名稱:

encryption

Namespace: 命名空間:

urn:oasis:names:tc:opendocument:xmlns:container

Usage: 用法:

REQUIRED root element [xml] of the encryption.xml file.
encryption.xml 檔的 REQUIRED 根元素 [ xml]。

Attributes: 屬性:

None 沒有

Content Model: 內容模型:

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 加密中所述。

Note 注意

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] 對簽名資源進行加密。此功能使讀取系統能夠區分簽名前加密的數據和簽名后加密的數據。

4.2.6.3.2.2 Order of compression and encryption
4.2.6.3.2.2 壓縮和加密的順序

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 元數據來指定初始資源的大小(即在加密之前)。

Element Name: 元素名稱:

Compression

Namespace: 命名空間:

http://www.idpf.org/2016/encryption#compression

Usage: 用法:

OPTIONAL child of EncryptionProperty.
的OPTIONAL子項 EncryptionProperty

Attributes: 屬性:
Method [required] 方法 [required]

Identifies the compression method used.
標識使用的壓縮方法。

Value is either "0" (no compression) or "8" (Deflate algorithm).
值為 “ 0 ”(無壓縮)或 “ 8 ” (Deflate 演算法)。

OriginalLength [required] 原始長度 [required]

Represents the size of the initial resource (number of bytes).
表示初始資源的大小(位元元元元)。

Value is a positive integer.
value 是正整數。

Content Model: 內容模型:

Empty 

4.2.6.3.3 Manifest file (manifest.xml)
4.2.6.3.3 清單檔 ( manifest.xml

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 出版物的清單。讀取系統不使用此檔。

Note 注意
This feature exists only for compatibility with [odf].
此功能僅存在與 [ odf 相容。
4.2.6.3.4 Metadata file (metadata.xml)
4.2.6.3.4 元數據檔 ( metadata.xml

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 檔中使用的元數據。此規範的未來版本可能會定義容器級元數據。

4.2.6.3.5 Rights management file (rights.xml)
4.2.6.3.5 許可權管理檔 ( rights.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 出版物中可能存在權利表達。

4.2.6.3.6 Digital signatures file (signatures.xml)
4.2.6.3.6 數位簽名檔 ( signatures.xml
Note 注意

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 檔保存容器及其內容的數位簽名。

4.2.6.3.6.1 The signatures element
4.2.6.3.6.1 signatures 元素
Element Name: 元素名稱:

signatures

Namespace: 命名空間:

urn:oasis:names:tc:opendocument:xmlns:container

Usage: 用法:

REQUIRED root element [xml] of the signature.xml file.
signature.xml 檔的 REQUIRED 根元素 [ xml]。

Attributes: 屬性:

None 沒有

Content Model: 內容模型:
  • 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)的簽名。

Note 注意

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 元素。

Note 注意

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 簽名檔。此轉換將對所有以前的簽名進行簽名,如果將後續簽名添加到包中,則該轉換將變為無效。

Note 注意

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 元素。

4.3 OCF ZIP container 4.3 OCF ZIP容器

4.3.1 Introduction 4.3.1 簡介

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 閱讀系統或使用者。

4.3.2 ZIP file requirements
4.3.2 ZIP檔要求

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 字段設置為值 102045 匹配給定檔所需的最大版本級別(例如, 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 方法欄位設定為值 08 .

4.3.3 OCF ZIP container media type identification
4.3.3 OCF ZIP容器介質類型識別

EPUB creators MUST include the mimetype file as the first file in the OCF ZIP container. In addition:
EPUB 建立者必須將該 mimetype 檔作為 OCF ZIP 容器中的第一個檔包含在內。另外:

  • The contents of the 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
  • The mimetype file MUST NOT contain any leading or trailing padding or white space.
    mimetype 不得包含任何前導或尾隨填充或空格。
  • The mimetype file MUST NOT begin with the Unicode byte order mark U+FEFF.
    mimetype 檔不得以 Unicode 位元組順序標記 U+FEFF 開頭。
  • EPUB creators MUST NOT compress or encrypt the mimetype file.
    EPUB 建立者不得壓縮或加密 mimetype 檔。
  • EPUB creators MUST NOT include an extra field in its ZIP header.
    EPUB 建立者不得在其 ZIP 標頭中包含額外的欄位。
Note 注意

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 介質類型。

4.4 Font obfuscation 4.4 字體混淆

Caution 謹慎

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 建立者僅在沒有其他選項可用時才使用本節中定義的字體混淆。另請參閱混淆的局限性。

4.4.1 Introduction 4.4.1 簡介

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 收件者進行額外的工作才能獲得對任何混淆字體的常規訪問許可權。

4.4.2 Limitations 4.4.2 限制

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:
與任何保護方案一樣,混淆不能完全保護字體在反混淆狀態下不被訪問。該機制僅為那些不瞭解許可證詳細資訊的人提供了障礙。它不會阻止確定的使用者通過以下替代方式獲得對字型的完全存取權限:

  • applying the deobfuscation algorithm to extract the raw font file;
    應用反混淆演算法提取原始字體檔;
  • accessing the deobfuscated font through a reading system that must dedobfuscate it to render the content (e.g., by accessing the resources through a browser-based reading system); or
    通過閱讀系統訪問去混淆字體,該系統必須對其進行去混淆以呈現內容(例如,通過基於瀏覽器的閱讀系統訪問資源);或
  • accessing the deobfuscated font through authoring tools that provide the visual rendering of the content.
    通過提供內容視覺呈現的創作工具訪問經過反混淆處理的字體。

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 容器中任何資源的通用機制。

4.4.3 Obfuscation key 4.4.3 混淆鍵

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+0020U+0009U+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 摘要。然後,他們可以將此摘要用作演算法的金鑰。

4.4.4 Obfuscation algorithm
4.4.4 混淆演算法

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.
以下偽代碼舉例說明瞭混淆演算法。

  1. set ocf to OCF ZIP container file
    將 ocf 設置為 OCF ZIP 容器檔
  2. set source to font file
    將源設置為字體檔
  3. set destination to obfuscated font file
    將目標設置為混淆字體檔
  4. set keyData to key for file
    將keyData設定為文件的鍵
  5. set outer to 0 將 outer 設置為 0
  6. while outer < 52 and not (source at EOF)
    而外< 52 而不是(來源於 EOF)
    1. set inner to 0 將 inner 設置為 0
    2. while inner < 20 and not (source at EOF)
      而內部< 20 而不是(來源於 EOF)
      1. read 1 byte from source (Assumes read advances file position)
        從源讀取 1 個字節(假定讀取推進檔案位置)
      2. set sourceByte to result of read
        將 sourceByte 設定為讀取結果
      3. set keyByte to byte inner of keyData
        將keyByte設置為keyData的內部位元組
      4. set obfuscatedByte to (sourceByte XOR keyByte)
        將 obfuscatedByte 設置為 (sourceByte XOR keyByte)
      5. write obfuscatedByte to destination
        將 obfuscatedByte 寫入目標
      6. increment inner 增量內部
      end while 結束而
    3. increment outer 增量外部
    end while 結束而
  7. if not (source at EOF) then
    如果不是(來源於 EOF),那麼
    1. read source to EOF 將原始碼讀取到 EOF
    2. write result of read to destination
      讀取到目標的寫入結果
    end if 如果結束
  8. Deflate destination 放氣目的地
  9. store destination as source in ocf
    在 OCF 中將目標存儲為源

4.4.5 Specifying obfuscated fonts
4.4.5 指定混淆字體

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 檔中提供混淆密鑰。

5. Package document 5. 包裝檔

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] 中。

5.1 Introduction 5.1 引言

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:
以下清單總結了在包文件中找到的資訊:

Note 注意

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

Note 注意

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 類型。

5.2 Parsing URLs in the package document
5.2 解析包文檔中的URL

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 作為基礎。

5.3 Shared attributes 5.3 共用屬性

This section provides definitions for shared attributes (i.e., attributes allowed on two or more elements).
本節提供共用屬性的定義(即允許在兩個或多個元素上使用的屬性)。

5.3.1 The dir attribute (under-implemented)
5.3.1 dir 屬性(未實現)

Note 注意

The dir attribute is marked under-implemented as reading systems often only support a single default directionality for text display. EPUB creators are still strongly encouraged to set the proper directionality of text values in the package document to ensure proper rendering once this situation improves.
dir 屬性被標記為未實現,因為閱讀系統通常只支援文本顯示的單個預設方向性。我們仍然強烈建議 EPUB 建立者在包文檔中設置文本值的正確方向性,以確保在這種情況改善後正確呈現。

Specifies the base direction [bidi] of the textual content and attribute values of the carrying element and its descendants.
指定承載元素及其後代的文本內容和屬性值的基本方向 [ bidi]。

Allowed values are: 允許的值為:

  • ltr — left-to-right base direction;
    ltr — 從左到右的基本方向;
  • rtl — right-to-left base direction; and
    rtl — 從右到左的基本方向;和
  • auto — base direction is determined using the Unicode Bidi Algorithm [bidi].
    auto — 基方向使用 Unicode 雙向演算法 [ bidi] 確定。

Reading systems will assume the value auto when EPUB creators omit the attribute or use an invalid value.
當 EPUB 建立者省略屬性或使用無效值時,讀取系統將假定該值 auto

Note 注意

The base direction specified in the dir attribute does not affect the ordering of characters within directional runs, only the relative ordering of those runs and the placement of weak directional characters such as punctuation.
dir 屬性中指定的基本方向不會影響定向行中字元的順序,只會影響這些行程的相對順序和弱定向字元(如標點符號)的位置。

Allowed on: collection, dc:contributor, dc:coverage, dc:creator, dc:description, dc:publisher, dc:relation, dc:rights, dc:subject, dc:title, meta and package.
允許在: collection 、 、 、 dc:contributor dc:coverage dc:creator dc:description dc:publisher dc:relation dc:rights dc:subject dc:title metapackage

5.3.2 The href attribute
5.3.2 href 屬性

A valid URL string [url] that references a resource.
引用資源的有效 URL 字串 [ url]。

The URL string MUST NOT reference resources via elements in the package document (e.g., via a manifest item or spine itemref declaration).
URL 字串不得通過包文檔中的元素(例如,通過清單 item 或主 itemref 幹聲明)引用資源。

Allowed on: item and link.
允許在: itemlink

5.3.3 The id attribute
5.3.3 id 屬性

The ID [xml] of the element, which MUST be unique within the document scope.
元素的ID[xml],在文件範圍內必須是唯一的。

Allowed on: collection, dc:contributor, dc:coverage, dc:creator, dc:date, dc:description, dc:format, dc:identifier, dc:language, dc:publisher, dc:relation, dc:rights, dc:source, dc:subject, dc:title, dc:type, item, itemref, link, manifest, meta, package and spine.
允許在: collection , , dc:contributor , , dc:coverage dc:creatordc:date dc:description dc:format dc:identifier dc:language dc:publisher dc:relation dc:rights dc:source dc:subject dc:title dc:type item itemref link manifest meta package spine .

5.3.4 The media-type attribute
5.3.4 media-type 屬性

A media type [rfc2046] that specifies the type and format of the referenced resource.
指定引用資源的類型和格式的媒體類型 [ rfc2046]。

Allowed on: item and link.
允許在: itemlink

5.3.5 The properties attribute
5.3.5 properties 屬性

A space-separated list of property values.
以空格分隔的屬性值清單。

Refer to each element's definition for the reserved vocabulary for the attribute.
有關屬性的保留詞彙表,請參閱每個元素的定義。

Allowed on: item, itemref and link.
允許在: itemitemref link .

5.3.6 The refines attribute
5.3.6 refines 屬性

Establishes an association between the current expression and the element or resource identified by its value. EPUB creators MUST use as the value a path-relative-scheme-less-URL string, optionally followed by U+0023 (#) and a URL-fragment string that references the resource or element they are describing.
在當前表達式與其值標識的元素或資源之間建立關聯。EPUB 建立者必須使用 path-relative-scheme-less-URL 字串作為值,(可選)後跟 U+0023 (#) 引用他們所描述的資源或元素的 URL-fragment 字符串。

The refines attribute is OPTIONAL depending on the type of metadata expressed. When omitted, the element defines a primary expression.
refines 屬性是OPTIONAL,具體取決於所表達的元數據類型。省略時,該元素定義主表達式。

When creating expressions about a publication resource, the refines attribute SHOULD specify a fragment identifier that references the ID [xml] of the resource's manifest entry.
創建有關發佈資源的表示式時, refines 該屬性應指定引用資源清單條目的ID[xml]的片段識別碼。

Refinement chains MUST NOT contain circular references or self-references.
精簡鏈不得包含迴圈引用或自引用。

Allowed on: link and meta.
允許在: linkmeta

5.3.7 The xml:lang attribute
5.3.7 xml:lang 屬性

Specifies the language of the textual content and attribute values of the carrying element and its descendants, as defined in section 2.12 Language Identification of [xml]. The value of each xml:lang attribute MUST be a well-formed language tag [bcp47].
指定承載元素及其後代的文本內容和屬性值的語言,如第 2.12 節 [ xml 的語言標識中所定義。每個 xml:lang 屬性的值必須是格式正確的語言標記 [bcp47]。

Allowed on: collection, dc:contributor, dc:coverage, dc:creator, dc:description, dc:publisher, dc:relation, dc:rights, dc:subject, dc:title, meta and package.
允許在: collection 、 、 、 dc:contributor dc:coverage dc:creator dc:description dc:publisher dc:relation dc:rights dc:subject dc:title metapackage

5.4 The package element
5.4 package 元素

The package element encapsulates all the information expressed in the package document.
package 元素封裝了包文檔中表示的所有資訊。

Element Name: 元素名稱:

package

Usage: 用法:

REQUIRED root element [xml] of the package document.
包文件的 REQUIRED 根元素 [ xml]。

Attributes: 屬性:
Content Model: 內容模型:

In this order: 依此順序:

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。

Note 注意

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 dc:identifier element that provides the preferred, or primary, 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

5.5 Metadata section 5.5 元數據部分

5.5.1 The metadata element
5.5.1 metadata 元素

The metadata element encapsulates meta information.
metadata 元素封裝元資訊。

Element Name: 元素名稱:

metadata

Usage: 用法:

REQUIRED first child of package.
必需的第一個子項 package

Attributes: 屬性:

None 沒有

Content Model: 內容模型:

In any order: 按任意順序:

The package document metadata element has two primary functions:
包文件 metadata 元素有兩個主要功能:

  1. 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 出版物進行內部編目並提供給使用者(例如,在書架上展示)。

  2. 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 link 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.
包文檔不提供複雜的元數據編碼功能。如果 EPUB 建立者需要提供更詳細的資訊,他們可以使用該 link 元素關聯元數據記錄(例如,符合 [ onix] 等國際標準或為自定義目的創建的元數據記錄)。這種方法允許讀取系統以本機形式處理元數據,從而避免了因使用最小包文檔結構進行翻譯而導致的潛在問題和信息丟失。

In keeping with this philosophy, the package document only has the following minimal metadata requirements: it MUST contain the [dcterms] dc:title, dc:identifier, and dc:language elements together with the [dcterms] dcterms:modified property. All other metadata is OPTIONAL.
為了與這一理念保持一致,包文檔僅具有以下最低元數據要求:它必須包含 [ dcterms] dc:titledc:identifierdc:language 元素以及 [ dcterms] dcterms:modified 屬性。所有其他元數據都是可選的。

The meta 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 規範中定義的呈現元數據。

Note 注意

See [epub-a11y-11] for accessibility metadata recommendations.
請參閱 [ epub-a11y-11] 瞭解輔助功能元數據建議。

5.5.2 Metadata values 5.5.2 元數據值

The Dublin Core elements [dcterms] and meta element have mandatory child text content [dom]. In the descriptions for these elements, this specification refers to this content as the element's value.
Dublin Core 元素 [ dcterms] 和 meta 元素具有必需的子文本內容 [ dom]。在這些元素的描述中,此規範將此內容稱為元素的值。

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] 。

5.5.3 Dublin Core required elements
5.5.3 都柏林核心必需元素

5.5.3.1 The dc:identifier element
5.5.3.1 dc:identifier 元素

The dc:identifier element [dcterms] contains an identifier such as a UUID, DOI or ISBN.
dc:identifier 元素 [ dcterms] 包含一個識別碼,例如 UUID、DOI 或 ISBN。

Element Name: 元素名稱:

dc:identifier

Namespace: 命名空間:

http://purl.org/dc/elements/1.1/

Usage: 用法:

REQUIRED child of metadata. Repeatable.
的必需子項 metadata 。重複。

Attributes: 屬性:
  • id [conditionally required]

Content Model: 內容模型:

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 package element's 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 元素的價值符合既定系統或授予它的頒發機構。

5.5.3.2 The dc:title element
5.5.3.2 dc:title 元素

The dc:title element [dcterms] represents an instance of a name for the EPUB publication.
dc:title 元素 [ dcterms] 表示 EPUB 出版物的名稱實例。

Element Name: 元素名稱:

dc:title

Namespace: 命名空間:

http://purl.org/dc/elements/1.1/

Usage: 用法:

REQUIRED child of metadata. Repeatable.
的必需子項 metadata 。重複。

Attributes: 屬性:
Content Model: 內容模型:

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 元素,以確保標題在閱讀系統中的呈現一致。

Note 注意

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 示例)。仍然可以添加這些語義,但它們也沒有得到很好的支援。

5.5.3.3 The dc:language element
5.5.3.3 dc:language 元素

The dc:language element [dcterms] specifies the language of the content of the EPUB publication.
dc:language 元素 [ dcterms] 指定 EPUB 出版物內容的語言。

Element Name: 元素名稱:

dc:language

Namespace: 命名空間:

http://purl.org/dc/elements/1.1/

Usage: 用法:

REQUIRED child of metadata. Repeatable.
的必需子項 metadata 。重複。

Attributes: 屬性:

id [optional]

Content Model: 內容模型:

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 出版物的主要語言。

Note 注意

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 建立者必須使用格式的固有方法設置資源的語言。

5.5.4 Dublin Core optional elements
5.5.4 都柏林核心可選元素

5.5.4.1 General definition
5.5.4.1 一般定義

All [dcterms] elements except for dc:identifier, dc:language, and dc:title are designated as OPTIONAL. These elements conform to the following generalized definition:
除 、 dc:languagedc:title 之外 dc:identifier 的所有 [ dcterms] 元素都指定為 OPTIONAL。這些元素符合以下廣義定義:

Element Name: 元素名稱:

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

Namespace: 命名空間:

http://purl.org/dc/elements/1.1/

Usage: 用法:

OPTIONAL child of metadata. Repeatable.
的OPTIONAL子項 metadata 。重複。

Attributes: 屬性:
  • 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:contributordc:coverage 、 、 dc:creatordc:description dc:publisherdc: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:contributordc:coverage 、 、 dc:creatordc:description dc:publisherdc:relation dc:rights dc:subject 上 。

Content Model: 內容模型:

Text 發簡訊

This specification does not modify the [dcterms] element definitions except as noted in the following sections.
本規範不修改 [ dcterms] 元素定義,除非以下各節中另有說明。

5.5.4.2 The dc:contributor element
5.5.4.2 dc:contributor 元素

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 dc:creator element in all other respects.
在所有其他方面,對 dc:contributor 元素的要求與 dc:creator 對元素的要求相同。

5.5.4.3 The dc:creator element
5.5.4.3 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 dc:contributor element.
EPUB 建立者應代表使用該 dc:contributor 元素的次要貢獻者。

5.5.4.4 The dc:date element
5.5.4.4 dc:date 元素

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 元素。

5.5.4.5 The dc:subject element
5.5.4.5 dc:subject 元素

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 屬性的值才區分大小寫。

5.5.4.6 The dc:type element
5.5.4.6 dc:type 元素

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 建立者可以使用任何文字字串作為值。

Note 注意

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出版物類型。該工作組不再維護登記冊,也不期望開發新的專門出版物類型。

5.5.5 The meta element
5.5.5 meta 元素

The meta element provides a generic means of including package metadata.
meta 元素提供了包含包元數據的通用方法。

Element Name: 元素名稱:

meta

Usage: 用法:

As child of the metadata element. Repeatable.
作為 metadata 元素的子元素。重複。

Attributes: 屬性:
Content Model: 內容模型:

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 元素定義這些表示式:

  • A primary expression is one in which the expression defined in the 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 元素定義主運算式。
  • A subexpression is one in which the expression defined in the 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 建立者可以使用子表達式來細化其他子表達式的含義,從而創建資訊鏈。

Note 注意

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 屬性沒有預設詞彙表(即,所有值都需要前綴)。

5.5.6 Last modified date 5.5.6 上次修改日期

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 屬性)。

Note 注意

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]。

5.6 Manifest section 5.6 清單部分

5.6.1 The manifest element
5.6.1 manifest 元素

The manifest element provides an exhaustive list of publication resources used in the rendering of the content.
manifest 元素提供在呈現內容時使用的發佈資源的詳盡清單。

Element Name: 元素名稱:

manifest

Usage: 用法:

REQUIRED second child of package, following metadata.
必需的第二個 package 子項,在 metadata 之後。

Attributes: 屬性:

id [optional]

Content Model: 內容模型:

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 元素(即,自引用沒有任何用途)。

Note 注意

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.
未能提供發佈資源的完整清單可能會導致呈現問題。出於安全原因,讀取系統可能無法解壓縮此類資源,或者可能會阻止訪問它們。

5.6.2 The item element
5.6.2 item 元素

The item element represents a publication resource.
item 元素表示發佈資源。

Element Name: 元素名稱:

item

Usage: 用法:

As a child of manifest. Repeatable.
作為. manifest 重複。

Attributes: 屬性:
Content Model: 內容模型:

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 媒體覆蓋打包。

Note 注意

The order of item elements in the manifest is not significant. The spine element provides the presentation sequence of content documents.
manifest 元素的 item 順序並不重要。該 spine 元素提供內容文件的表示順序。

5.6.2.1 Resource properties
5.6.2.1 資源屬性

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 詞彙關聯機制中定義的其他詞彙中添加術語。

5.6.2.2 Examples 5.6.2.2 示例

5.6.3 The bindings element (deprecated)
5.6.3 元素 bindings (已棄用)

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 元素定義。

5.7 Spine section 5.7 脊柱部分

5.7.1 The spine element
5.7.1 spine 元素

The spine element defines an ordered list of manifest item references that represent the default reading order.
spine 元素定義表示預設讀取順序的清單 item 引用的有序清單。

Element Name: 元素名稱:

spine

Usage: 用法:

REQUIRED third child of package, following manifest.
需要 的第三個子項 package ,以下 manifest

Attributes: 屬性:
Content Model: 內容模型:

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] aarea 元素的 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 .

Note 注意

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]。

5.7.2 The itemref element
5.7.2 itemref 元素

The itemref element identifies an EPUB content document or foreign content document in the default reading order.
itemref 元素以預設讀取順序標識 EPUB 內容文件或外部內容文檔。

Element Name: 元素名稱:

itemref

Usage: 用法:

As a child of spine. Repeatable.
作為. spine 重複。

Attributes: 屬性:
Content Model: 內容模型:

Empty 

Each itemref element MUST reference the ID [xml] of an item in the manifest via the IDREF [xml] in its idref attribute. item element IDs MUST NOT be referenced more than once.
每個 itemref 元素都必須通過其 idref 屬性中的 IDREF [ xml] 引用清單中 an item 的 ID [ xml]。 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 內容文件的外部內容文件。

Note 注意

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.
但是,指定內容是非線性的並不需要閱讀系統以特定方式呈現它;這隻是對目的的暗示。例如,閱讀系統可能會在脊柱中出現非線性內容的地方呈現非線性內容,或者可以跳過它,直到使用者到達脊柱的末端。

Note 注意

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 詞彙關聯機制中定義的其他詞彙中添加術語。

5.8 Collections 5.8 收藏

5.8.1 The collection element
5.8.1 collection 元素

The collection element defines a related group of resources.
collection 元素定義一組相關的資源。

Element Name: 元素名稱:

collection

Usage: 用法:

OPTIONAL sixth element of package. Repeatable.
的可選第六個元素 package 。重複。

Attributes: 屬性:
Content Model: 內容模型:

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.
創作專用集合的要求由其各自的規範定義。

Note 注意

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工作組維護著角色擴展註冊表和自定義擴展角色清單。本工作組不再維護這些登記冊。

5.8.2 Defining collection types (deprecated)
5.8.2 定義集合類型(不推薦使用)

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 元素定義。

5.9 Legacy features 5.9 舊版功能

5.9.1 Introduction 5.9.1 簡介

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 建立者在努力添加這些舊功能之前,應考慮其出版物在這些類型的舊設備上仍被打開的可能性。

5.9.2 Support 5.9.2 支援

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 閱讀系統在向使用者展示出版物時不會使用這些功能。

Note 注意

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 建立者。

5.9.3 The meta element
5.9.3 meta 元素

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 元素定義。

Note 注意

The EPUB 3 meta element, which uses different attributes and requires text content, provides metadata capabilities for EPUB 3 reading systems.
EPUB 3 meta 元素使用不同的屬性並需要文本內容,為 EPUB 3 讀取系統提供元數據功能。

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 item for the image.
[ opf-201] meta 元素還允許 EPUB 建立者識別 EPUB 2 閱讀系統的封面圖像。在 EPUB 3 中,必須使用圖像清單 item 上的 cover-image 屬性來標識封面圖像。

5.9.4 The guide element
5.9.4 guide 元素

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 元素定義。

Note 注意

The landmarks nav in the EPUB navigation document provides this functionality in EPUB 3 reading systems.
EPUB 導航文件中的標誌導航在 EPUB 3 閱讀系統中提供此功能。

5.9.5 NCX 5.9.5 NCX的

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 定義。

Note 注意

The EPUB navigation document replaces the NCX for EPUB 3 reading systems.
EPUB 導航文件取代了 EPUB 3 讀取系統的 NCX。

6. EPUB content documents
6. EPUB 內容文件

6.1 XHTML content documents
6.1 XHTML內容文檔

6.1.1 Introduction 6.1.1 引言

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 內容文件。

6.1.2 XHTML requirements 6.1.2 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] 規範繼承語義、結構和處理行為的所有定義。

Note 注意

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 內容文檔。請參閱輔助功能。

6.1.3 HTML extensions 6.1.3 HTML 擴展

This section defines EPUB 3 XHTML content document extensions to the underlying [html] document model.
本節定義基礎 [ html] 文件模型的 EPUB 3 XHTML 內容文檔擴展。

Note 注意

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 支援的功能。

6.1.3.1 Structural semantics
6.1.3.1 結構語義

EPUB creators MAY use the epub:type attribute in XHTML content documents to express structural semantics.
EPUB 建立者可以使用 XHTML 內容文檔中的 epub:type 屬性來表達結構語義。

The attribute MUST NOT be used on the head element or metadata content [html].
該屬性不得用於 head 元素或元數據內容 [ html]。

6.1.3.2 RDFa

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 內容文件中有效。

Note 注意

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],因為兩者都是本機支援的。

6.1.3.3 Content switching (deprecated)
6.1.3.3 內容切換(已棄用)

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 元素定義。

6.1.3.4 The epub:trigger element (deprecated)
6.1.3.4 epub:trigger 元素(已棄用)

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 元素定義。

6.1.3.5 Custom attributes
6.1.3.5 自定義屬性

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.
使用自定義屬性時,無論在何種閱讀系統上呈現內容,用戶都必須保持使用者使用的內容,而不會造成任何信息丟失或其他重大劣化。

Note 注意

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.
自定義屬性通常以特定於讀取系統的方式定義,不供其他讀取系統使用。此規範應進行擴展,以提供多個獨立讀取系統可以使用的擴展。

6.1.4 HTML deviations and constraints
6.1.4 HTML 偏差和約束

This section defines deviations from, and constraints on, the underlying [html] document model applicable to EPUB 3 XHTML content documents.
本節定義了適用於 EPUB 3 XHTML 內容文檔的基礎 [ html] 文檔模型的偏差和約束。

6.1.4.1 Embedded MathML 6.1.4.1 嵌入式MathML

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] 中表達的約束,並具有以下附加限制:

Presentation MathML 演示MathML

The math element MUST contain only Presentation MathML, except within the annotation-xml element.
math 元素必須僅包含 Presentation MathML,但 annotation-xml 元素內除外。

Content MathML 內容MathML

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-Contentapplication/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] 使用者代理的相容性。

Note 注意

The mathml property of the manifest item element indicates that an XHTML content document contains embedded MathML.
manifest item 元素的 mathml 屬性指示 XHTML 內容文件包含嵌入的 MathML。

6.1.4.2 Embedded SVG 6.1.4.2 嵌入式SVG

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 內容文件定義的約束相同。

Note 注意

The svg property of the manifest item element indicates that an XHTML content document contains embedded SVG.
manifest item 元素的 svg 屬性指示 XHTML 內容文件包含嵌入的 SVG。

6.1.4.3 Discouraged constructs
6.1.4.3 不鼓勵的構造

This section is non-normative.
本節是非規範性的。

6.1.4.3.1 The base element
6.1.4.3.1 base 元素

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 元素。

6.1.4.3.2 The rp element
6.1.4.3.2 rp 元素

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 元素。

6.1.4.3.3 The embed element
6.1.4.3.3 embed 元素

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 元素是更好的選擇,因為它包含內部回退功能。

6.2 SVG content documents
6.2 SVG內容文件

Caution 謹慎

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 建立者應考慮互操作性和文檔壽命的固有風險。

6.2.1 Introduction 6.2.1 簡介

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 內容文件。

Note 注意

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。

6.2.2 SVG requirements 6.2.2 SVG要求

An SVG content document: SVG 內容文件:

Note 注意

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 內容文檔。請參閱輔助功能。

6.2.3 Restrictions on SVG
6.2.3 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 元素。

      Note 注意

      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 中聲明的元素。

Note 注意

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 建立者使用純文本標題,以實現最大的互操作性。

6.3 Common resource requirements
6.3 所需共同資源

This section defines requirements for technologies usable in both XHTML and SVG content documents.
本節定義了 XHTML 和 SVG 內容文件中可用的技術的要求。

6.3.1 Cascading Style Sheets (CSS)
6.3.1 級聯樣式表(CSS)

6.3.1.1 Introduction 6.3.1.1 簡介

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。

Note 注意

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).
    某些類型的螢幕會呈現較差的動畫和過渡效果(例如,延遲較高的螢幕)。

6.3.1.2 CSS requirements 6.3.1.2 CSS要求

A CSS style sheet:
CSS 樣式表:

  • MAY include any CSS properties, with the following exceptions:
    可以包含任何 CSS 屬性,但以下情況除外:

  • 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作為推薦編碼。

Note 注意

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 屬性替代項,用於雙向性。

6.3.1.3 Prefixed properties
6.3.1.3 前置屬性

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 屬性中。

Caution 謹慎

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 的下一個主要版本中支持它們。

6.3.2 Scripting 6.3.2 腳本編寫

6.3.2.1 Script inclusion 6.3.2.1 腳本包含

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] 時,它不表示腳本內容。

Note 注意

[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])。

Note 注意

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 功能和/或提供不同的呈現和用戶體驗(例如,通過禁用分頁)的方式呈現腳本內容文檔。

6.3.2.2 Scripting contexts
6.3.2.2 腳本上下文

EPUB 3 defines two contexts for script execution:
EPUB 3 定義了文稿執行的兩個上下文:

Note 注意

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 建立者對其腳本使用的上下文會影響腳本可以執行的操作以及在讀取系統中提供支援的可能性,如以下小節所述。

Note 注意

Refer to H.2 Scripting contexts for an example of the difference between the two contexts.
請參閱 H.2 腳本上下文,瞭解兩個上下文之間的差異範例。

6.3.2.2.1 Container-constrained scripts
6.3.2.2.1 容器約束腳本

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 腳本回退)。

Note 注意

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 建立者選擇將腳本的使用限制為容器約束模型,將確保腳本內容和非腳本內容之間更一致的用戶體驗(例如,一致的分頁行為)。

6.3.2.2.2 Spine-level scripts
6.3.2.2.2 主幹級腳本

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 出版物無法讀取。

6.3.2.3 Event model 6.3.2.3 事件模型

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 建立者不應僅依賴鍵盤事件;它們應始終提供觸發所需操作的替代方法。

6.3.2.4 Scripting accessibility
6.3.2.4 腳本輔助功能

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] 可存取性技術,以確保所有使用者都可以使用內容。

6.3.2.5 Scripting fallbacks
6.3.2.5 腳本回退

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] objectcanvas 元素的機制)或在內部回退不適用時使用清單級回退來為此類內容提供回退。

EPUB creators MUST ensure that scripts only generate core media type resources or fragments thereof.
EPUB 建立者必須確保腳本僅生成核心媒體類型資源或其片段。

7. EPUB navigation document
7. EPUB導航文件

7.1 Introduction 7.1 引言

This section is non-normative.
本節是非規範性的。

The EPUB navigation document is a mandatory component of an EPUB publication. It allows EPUB creators to include a human- and machine-readable global navigation layer, thereby ensuring increased usability and accessibility for the user.
EPUB 導航文檔是 EPUB 出版物的強制性元件。它允許 EPUB 建立者包含人類和機器可讀的全域導航層,從而確保提高使用者的可用性和可訪問性。

The EPUB navigation document is a special type of XHTML content document that defines the table of contents for reading systems. It may also include other specialized navigation elements, such as a page list and a list of key landmarks. These navigation elements have additional restrictions on their content to facilitate their processing.
EPUB 導航文件是一種特殊類型的 XHTML 內容文件,用於定義閱讀系統的目錄。它還可能包括其他專用導航元素,例如頁面清單和關鍵地標清單。這些導航元素對其內容有額外的限制,以便於處理。

The EPUB navigation document is not exclusively for machine processing, however. There are no restrictions on the structure or content of the EPUB navigation document outside of the specialized navigation elements (i.e., EPUB creators can mark the rest of the document up like any other XHTML content document). As a result, it can also be part of the linear reading order, avoiding the need for duplicate tables of contents. EPUB creators can hide navigation elements that are only for machine processing (e.g., the page list) with the hidden attribute.
但是,EPUB 導航文檔並非專門用於機器加工。除了專用導航元素之外,對EPUB導航文檔的結構或內容沒有任何限制(即,EPUB 建立者可以像任何其他 XHTML 內容文檔一樣標記文檔的其餘部分)。因此,它也可以成為線性閱讀順序的一部分,從而避免了重複目錄的需要。EPUB 建立者可以使用該 hidden 屬性隱藏僅用於機器處理的導航元素(例如,頁面清單)。

Note that reading systems may strip scripting, styling, and HTML formatting as they generate navigational interfaces from information found in the EPUB navigation document, and this may make the result difficult to read. If EPUB creators require such formatting and functionality, then they should also include the EPUB navigation document in the spine. The use of progressive enhancement techniques for scripting and styling of the navigation document will help ensure the content will retain its integrity when rendered in a non-browser context.
請注意,閱讀系統可能會剝離腳本、樣式和 HTML 格式,因為它們會根據 EPUB 導航文檔中的資訊生成導航介面,這可能會使結果難以閱讀。如果 EPUB 建立者需要此類格式和功能,那麼他們還應該在書脊中包含 EPUB 導航文件。使用漸進式增強技術來編寫導航文檔的腳本和樣式將有助於確保內容在非瀏覽器上下文中呈現時保持其完整性。

7.2 Navigation document requirements
7.2 導航文檔要求

A valid EPUB navigation document:
有效的 EPUB 導航文件:

7.3 The nav element: restrictions
7.3 nav 要素:限制

When a nav element carries the epub:type attribute in an EPUB navigation document, this specification restricts the content model of the element and its descendants as follows:
nav 元素在 EPUB 導航文件中攜帶該 epub:type 屬性時,此規範將限制元素及其後代的內容模型,如下所示:

Content Model: 內容模型:
nav

In this order: 依此順序:

ol

In this order: 依此順序:

  • li [1 or more]

li

In this order: 依此順序:

  • (span or a) [exactly 1]
    spana[exactly 1]

  • ol [conditionally required]

span and a  spana

In any order: 按任意順序:

Note that there are no restrictions on the attributes allowed on these elements.
請注意,這些元素上允許的屬性沒有限制。

Refer the definition below for additional requirements.
有關其他要求,請參閱下面的定義。

The following elaboration of the content model of the nav element explains the purpose and restrictions of the various elements:
下面對 nav 元素的內容模型的闡述解釋了各種元素的用途和限制:

Caution 謹慎

Although the headings and links in nav elements allow any [html] phrasing content, app-based reading systems often only support simple text labels. Because these apps create their own navigation widgets that are not based on HTML rendering, they often cannot retain embedded images and multimedia, MathML, inline styling and other element- and attribute-based rendering instructions. EPUB creators should avoid using these types of elements where their absence may lead to usability issues.
儘管元素中 nav 的標題和連結允許任何 [ html] 措辭內容,但基於應用程式的閱讀系統通常只支援簡單的文本標籤。由於這些應用程式創建自己的導航小部件,這些小部件不基於 HTML 渲染,因此它們通常無法保留嵌入的圖像和多媒體、MathML、內聯樣式以及其他基於元素和屬性的渲染指令。EPUB 建立者應避免使用這些類型的元素,因為缺少這些元素可能會導致可用性問題。

As a conforming XHTML content document, EPUB creators MAY include the EPUB navigation document in the spine.
作為符合標準的 XHTML 內容文件,EPUB 建立者可以在書脊中包含 EPUB 導航文件。

In the context of this specification, the default display style of list items within nav elements is equivalent to the list-style: none property [csssnapshot]. EPUB creators MAY specify alternative list styling using CSS for rendering of the document in the spine.
在此規範的上下文中,元素中 nav 清單項的默認顯示樣式等效於 list-style: none 屬性 [ csssnapshot]。EPUB 建立者可以使用 CSS 指定替代清單樣式,以便在書脊中呈現文檔。

7.4 The nav element: types
7.4 nav 元素:類型

7.4.1 Introduction 7.4.1 簡介

This section is non-normative.
本節是非規範性的。

The nav elements defined in an EPUB navigation document are distinguished semantically by the value of their epub:type attribute.
EPUB 導航文件中定義的 nav 元素在語義上按其 epub:type 屬性的值進行區分。

This specification defines three types of navigation aid:
本規範定義了三種類型的導航輔助設備:

toc

Identifies the nav element that contains the table of contents. The toc nav is the only navigation aid that EPUB creators must include in the EPUB navigation document.
標識包含目錄的 nav 元素。這是 toc nav EPUB 建立者必須在 EPUB 導航文件中包含的唯一導航輔助工具。

page-list

Identifies the nav element that contains a list of pages for a print or other statically paginated source.
標識包含列印源或其他靜態分頁源的頁面清單的 nav 元素。

landmarks

Identifies the nav element that contains a list of points of interest.
標識包含興趣點清單的 nav 元素。

An EPUB navigation document may contain at most one navigation aid for each of these types.
EPUB 導航文件最多可以包含這些類型中的每一種導航輔助工具。

The EPUB navigation document may include additional navigation types. See 7.4.5 Other nav elements for more information.
EPUB 導航文件可能包括其他導航類型。有關詳細資訊,請參見 7.4.5 其他 nav 元素。

7.4.2 The toc nav element
7.4.2 toc nav 元素

The toc nav element defines the primary navigational hierarchy. It conceptually corresponds to a table of contents in a printed work (i.e., it provides navigation to the major structural sections of the publication).
toc nav 元素定義主導航層次結構。它在概念上對應於印刷作品中的目錄(即,它提供對出版物主要結構部分的導航)。

EPUB creators SHOULD order the references in the toc nav element such that they reflect both:
EPUB 建立者應對 toc nav 元素中的引用進行排序,以便它們同時反映以下兩個方面:

7.4.3 The page-list nav element
7.4.3 page-list nav 元素

The page-list element provides navigation to static page boundaries in the content. These boundaries may correspond to a statically paginated source such as print or may be defined exclusively for the EPUB publication.
page-list 元素提供對內容中靜態頁面邊界的導航。這些邊界可能對應於靜態分頁的源,例如印刷品,也可以專門為 EPUB 出版物定義。

The page-list nav element is OPTIONAL in EPUB navigation documents and MUST NOT occur more than once.
page-list nav 元素在 EPUB 導航文件中是可選的,並且不得多次出現。

The page-list nav element SHOULD contain only a single ol descendant (i.e., no nested sublists).
page-list nav 元素應僅包含單個 ol 後代(即沒有嵌套的子清單)。

EPUB creators MAY identify the destinations of the page-list references in their respective EPUB content documents using the pagebreak term [epub-ssv-11].
EPUB 建立者可以使用 pagebreak 術語 [ epub-ssv-11] 在其各自的 EPUB 內容文檔中標識 page-list 參考文獻的目的地。

7.4.4 The landmarks nav element
7.4.4 landmarks nav 元素

The landmarks nav element identifies fundamental structural components in the content to enable reading systems to provide the user efficient access to them (e.g., through a dedicated button in the user interface).
landmarks nav 元素標識內容中的基本結構元件,使閱讀系統能夠為使用者提供對它們的有效訪問(例如,通過使用者介面中的專用按鈕)。

The landmarks nav element is OPTIONAL in EPUB navigation documents and MUST NOT occur more than once.
landmarks nav 元素在 EPUB 導航文件中是可選的,並且不得多次出現。

The landmarks nav element SHOULD contain only a single ol descendant (i.e., no nested sublists).
landmarks nav 元素應僅包含單個 ol 後代(即沒有嵌套的子清單)。

The epub:type attribute is REQUIRED on a element descendants of the landmarks nav element. The structural semantics of each link target within the landmarks nav element is determined by the value of this attribute.
epub:type 屬性在元素的後代上 a 是必需的 landmarks navlandmarks nav 元素中每個鏈接目標的結構語義由此屬性的值確定。

The landmarks nav MUST NOT include multiple entries with the same epub:type value that reference the same resource, or fragment thereof.
不得 landmarks nav 包含引用同一資源或其片段的具有相同 epub:type 值的多個條目。

EPUB creators should limit the number of items they define in the landmarks nav to only items that a reading system is likely to use in its user interface. The element is not meant to repeat the table of contents.
EPUB 建立者應將他們在 中 landmarks nav 定義的專案數限制為閱讀系統可能在其用戶介面中使用的專案。該元素並不意味著重複目錄。

The following landmarks are recommended to include when available:
建議在可用時包括以下地標:

  • bodymatter [epub-ssv-11] — Reading systems often use this landmark to automatically jump users past the front matter when they begin reading.
    bodymatter [ epub-ssv-11] — 當使用者開始閱讀時,閱讀系統經常使用此地標自動跳過前端內容。
  • toc [epub-ssv-11] — If the table of contents is available in the spine, reading systems may use this landmark to take users to the document containing it.
    toc [ epub-ssv-11] — 如果目錄在書脊中可用,閱讀系統可以使用此標記將使用者帶到包含它的文檔。

Other possibilities for inclusion in the landmarks nav are key reference sections such as indexes and glossaries.
其他可能被列入索引 landmarks nav 和詞彙表等關鍵參考部分的可能性。

Although the landmarks nav is intended for reading system use, EPUB creators should still ensure that the labels for the landmarks nav are human readable. Reading systems may expose the links directly to users.
landmarks nav 儘管 EPUB 旨在用於讀取系統,但 EPUB 建立者仍應確保其標籤 landmarks nav 是人類可讀的。閱讀系統可能會將連結直接暴露給使用者。

7.4.5 Other nav elements
7.4.5 其他 nav 元素

EPUB navigation documents MAY contain one or more nav elements in addition to the toc, page-list, and landmarks nav elements defined in the preceding sections. If these nav elements are intended for reading system processing, they MUST have an epub:type attribute and are subject to the content model restrictions defined in 7.3 The nav element: restrictions.
除了前面各節中定義的 tocpage-listlandmarks nav 元素之外,EPUB 導航文件還可以包含一個或多個 nav 元素。如果這些 nav 元素用於讀取系統處理,則它們必須具有屬性 epub:type ,並受 7.3 元素 nav :限制中定義的內容模型限制的約束。

This specification imposes no restrictions on the semantics of any additional nav elements: they MAY represent navigational semantics for any information domain, and they MAY contain link targets with homogeneous or heterogeneous semantics.
該規範對任何其他 nav 元素的語義沒有施加任何限制:它們可以表示任何資訊域的導航語義,並且它們可以包含具有同質或異構語義的連結目標。

7.5 Using in the spine
7.5 在脊柱中使用

This section is non-normative.
本節是非規範性的。

Although it is possible to reuse the EPUB navigation document in the spine, it is often the case that not all of the navigation structures, or branches within them, are needed. EPUB creators will often want to hide the page list and landmarks navigation elements or trim the branches of the table of contents for books that have many levels of subsections.
儘管可以在書脊中重用 EPUB 導航文檔,但通常不需要所有導航結構或其中的分支。EPUB 建立者通常希望隱藏頁面清單和地標導航元素,或者修剪具有多個子部分級別的書籍的目錄分支。

While the display property [csssnapshot] controls the visual rendering of EPUB navigation documents in reading systems with viewports, reading systems without viewports may not support CSS. To better ensure the proper rendering in these reading systems, EPUB creators should use the [html] hidden attribute to indicate which (if any) portions of the navigation data are excluded from rendering in the content flow.
雖然 display 屬性 [ csssnapshot] 控制具有視口的閱讀系統中 EPUB 導航文檔的可視化呈現,但沒有視口的閱讀系統可能不支援 CSS。為了更好地確保在這些閱讀系統中正確呈現,EPUB 建立者應使用 [ html] hidden 屬性來指示導航數據的哪些(如果有)部分被排除在內容流中的呈現之外。

The hidden attribute has no effect on how reading systems render the navigation data outside of the content flow (such as in dedicated navigation user interfaces provided by reading systems).
hidden 屬性對閱讀系統在內容流之外呈現導航數據的方式(例如,在閱讀系統提供的專用導航用戶介面中)沒有影響。

Note 注意

The hidden attribute can be used together with the display property to maximize interoperability across all reading systems.
hidden 屬性可以與屬性一起使用, display 以最大限度地提高所有讀取系統之間的互操作性。

set 限制解除

8. Layout rendering control
8. 佈局渲染控制

8.1 Introduction 8.1 引言

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 建立者以最佳方式設計內容時呈現內容。

8.2 Fixed layouts 8.2 固定佈局

8.2.1 Introduction 8.2.1 簡介

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 內容文件中設置每個固定佈局文檔的尺寸。

Note 注意

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 建立者對機制的選擇。

8.2.2 Fixed-layout package settings
8.2.2 固定佈局包設置

8.2.2.1 Layout 8.2.2.1 佈局

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 屬性一起使用:

reflowable 可回流焊

The content is not pre-paginated (i.e., reading systems apply dynamic pagination when rendering). Default value.
內容沒有預先分頁(即,閱讀系統在呈現時應用動態分頁)。預設值。

pre-paginated 預分頁

The content is pre-paginated (i.e., reading systems produce exactly one page per spine itemref when rendering).
內容是預先分頁的(即,閱讀系統 itemref 在渲染時每本書脊只生成一頁)。

Note 注意

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 內容文檔的屬性。

8.2.2.1.1 Layout overrides
8.2.2.1.1 佈局覆蓋

EPUB creators MAY specify the following properties locally on spine itemref elements to override the global value for the given spine item:
EPUB 建立者可以在主幹 itemref 元素上本地指定以下屬性,以覆蓋給定主幹項的全域值:

rendition:layout-pre-paginated
演繹版:佈局預分頁
Specifies that the given spine item is pre-paginated.
指定給定的主幹項是預先分頁的。
rendition:layout-reflowable
演繹版:佈局可重排
Specifies that the given spine item is reflowable.
指定給定的主幹項是可重排的。

EPUB creators MUST NOT use more than one of these overrides on any given spine item.
EPUB 建立者不得在任何給定的主幹專案上使用多個這些覆蓋。

8.2.2.2 Orientation 8.2.2.2 方向

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 meta element, it indicates that the intended orientation applies globally (i.e., for all spine items).
meta 元素上指定該 rendition:orientation 屬性時,它指示預期的方向應用於全域(即,對於所有主幹項)。

EPUB creators MUST use one of the following values with the rendition:orientation property:
EPUB 建立者必須將以下值之一與 rendition:orientation 屬性一起使用:

landscape 景觀

Reading systems should render the content in landscape orientation.
閱讀系統應以橫向呈現內容。

portrait 肖像

Reading systems should render the content in portrait orientation.
閱讀系統應以縱向呈現內容。

auto 自動

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 內容文檔的屬性。

8.2.2.2.1 Orientation overrides
8.2.2.2.1 方向覆蓋

EPUB creators MAY specify the following properties locally on spine itemref elements to override the global value for the given spine item:
EPUB 建立者可以在主幹 itemref 元素上本地指定以下屬性,以覆蓋給定主幹項的全域值:

rendition:orientation-auto
再現:Orientation-Auto
Specifies that the reading system determines the orientation to render the spine item in.
指定讀取系統確定呈現書脊項的方向。
rendition:orientation-landscape
演繹版:方向-橫向
Specifies that reading systems should render the given spine item in landscape orientation.
指定閱讀系統應橫向呈現給定的書脊項。
rendition:orientation-portrait
演繹版:方向-縱向
Specifies that reading systems should render the given spine item in portrait orientation.
指定讀取系統應以縱向呈現給定的脊柱專案。

EPUB creators MUST NOT use more than one of these overrides on any given spine item.
EPUB 建立者不得在任何給定的主幹專案上使用多個這些覆蓋。

8.2.2.3 Synthetic spreads
8.2.2.3 合成點差

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 屬性一起使用:

none 沒有

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.
不要在合成塗抹醬中加入脊柱物品。閱讀系統應在位於螢幕中心的單個視口中顯示專案。

landscape 景觀

Render a synthetic spread for spine items only when the device is in landscape orientation.
僅當設備處於橫向時,才為主幹專案渲染合成跨頁。

portrait (deprecated) 肖像(已棄用)

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 」,因為在縱向可讀的跨頁在橫向中也可讀。

both 

Render a synthetic spread regardless of device orientation.
無論設備方向如何,都可呈現合成跨頁。

auto 自動

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 內容文檔的屬性。

Note 注意

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 屬性給出的維度分別表示跨頁中一頁的大小。

Note 注意

Refer to the spine element for information about declaration of global flow directionality using the page-progression-direction attribute and that of local page-progression-direction within content documents.
有關在內容文件中使用屬性 page-progression-direction 和本地頁面進度方向聲明全域流方向性的資訊,請參閱該 spine 元素。

8.2.2.3.1 Synthetic spread overrides
8.2.2.3.1 合成點差覆蓋

EPUB creators MAY specify the following properties locally on spine itemref elements to override the global value for the given spine item:
EPUB 建立者可以在主幹 itemref 元素上本地指定以下屬性,以覆蓋給定主幹項的全域值:

rendition:spread-auto 演繹:Spread-Auto
Specifies the reading system determines when to render a synthetic spread for the spine item.
指定讀取系統確定何時為主幹項呈現合成跨頁。
rendition:spread-both 演繹:Spread-both
Specifies the reading system should render a synthetic spread for the spine item in both portrait and landscape orientations.
指定閱讀系統應以縱向和橫向呈現書脊項的合成跨頁。
rendition:spread-landscape
演繹版:Spread-Landscape
Specifies the reading system should render a synthetic spread for the spine item only when in landscape orientation.
指定閱讀系統應僅在橫向時呈現書脊項的合成跨頁。
rendition:spread-none 演繹版:Spread-None
Specifies the reading system should not render a synthetic spread for the spine item.
指定閱讀系統不應呈現主幹項的合成跨頁。
rendition:spread-portrait
演繹版:跨頁縱向

The rendition:spread-portrait property is deprecated.
rendition:spread-portrait 屬性已棄用。

Refer to the spread-portrait property definition in [epubpublications-301] for more information.
有關詳細資訊,請參閱 [epubpublications-301] 中的 spread-portrait 屬性定義。

EPUB creators MUST NOT use more than one of these overrides on any given spine item.
EPUB 建立者不得在任何給定的主幹專案上使用多個這些覆蓋。

8.2.2.4 Spread placement 8.2.2.4 點差放置

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
The 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
The 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
The 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-leftrendition: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 ”是有效的)。

Note 注意

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-centerspread-none 禁用讀取系統中的傳播行為。

8.2.2.5 Viewport dimensions (deprecated)
8.2.2.5 視口尺寸(已棄用)

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 屬性定義。

8.2.2.6 Content document dimensions
8.2.2.6 內容文檔維度

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]:

Expressing in XHTML 在 XHTML 中表達

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 heightwidth definitions 中獲取的,其中:

  • the height property MUST have as its value a positive number or the keyword device-height; and
    height 屬性的值必須為正數或關鍵字 device-height ;和
  • the 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-widthdevice-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 或定義。

Expressing in SVG 以 SVG 表達

For SVG fixed-layout documents, the initial containing block [css2] dimensions MUST be expressed using the viewBox attribute [svg].
對於 SVG 固定佈局文件,必須使用 viewBox 屬性 [ svg] 表示包含塊 [ css2] 尺寸的初始。

Note 注意

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.
初始包含塊定義僅影響定義它的文件。同一出版物中其他內容文檔中包含塊的尺寸可能不同。

8.3 Reflowable layouts 8.3 可迴流焊佈局

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 建立者控制可重排內容的表示方面的屬性。

8.3.1 The rendition:flow property
8.3.1 rendition:flow 屬性

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 屬性一起使用:

paginated 分頁

Dynamically paginate all overflow content.
動態分頁所有溢出內容。

scrolled-continuous 滾動-連續

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 閱讀系統中的連續滾動演繹會出現問題。

scrolled-doc 滾動文檔

Render all EPUB content documents such that overflow content is scrollable, and each spine item is presented as a separate scrollable document.
呈現所有EPUB內容文檔,使溢出內容可滾動,並且每個主幹專案都顯示為單獨的可滾動文檔。

auto 自動

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 元素的默認呈現與已設置為 alwayspage-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 內容文檔設置屬性。

Figure 6 Rendering of an EPUB publication with a single spine item, and with the rendition:flow set to paginated.
圖 6 具有單個主幹項且 rendition:flow 設置為 paginated 的 EPUB 出版物的呈現。
The continuous progression of paginated content produced for a single document.
Image description 圖片說明

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.

Figure 7 Rendering of an EPUB publication with multiple spine items, and with the rendition:flow set to paginated.
圖 7 具有多個主幹項且 rendition:flow 設置為 paginated 的 EPUB 出版物的渲染。
The continuous progression of paginated content produced for each document with transitions to
					new pages between documents.
Image description 圖片說明

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.

Figure 8 Rendering of an EPUB publication with a single spine item, and with the rendition:flow set to scrolled-continuous.
圖 8具有單個主幹項且 rendition:flow 設置為 scrolled-continuous 的 EPUB 出版物的呈現。
The progression of a continuous scroll of content extends vertically off the user's screen,
					with new documents added to the bottom as encountered.
Image description 圖片說明

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.

Figure 9 Rendering of an EPUB publication with multiple spine items, and with the rendition:flow set to scrolled-doc.
圖 9 具有多個主幹項且 rendition:flow 設置為 scrolled-doc 的 EPUB 出版物的呈現。
The progression of scrollable documents depicting how only the content within each document
					is scrollable.
Image description 圖片說明

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.

8.3.1.1 Spine overrides 8.3.1.1 主幹覆蓋

EPUB creators MAY specify the following properties locally on spine itemref elements to override the global value for the given spine item:
EPUB 建立者可以在主幹 itemref 元素上本地指定以下屬性,以覆蓋給定主幹項的全域值:

rendition:flow-auto 演繹:flow-auto
Indicates no preference for overflow content handling by the EPUB creator.
表示 EPUB 建立者不優先處理溢出內容。
rendition:flow-paginated
演繹版:流分頁
Indicates the EPUB creator preference is to dynamically paginate content overflow.
指示 EPUB 建立者首選項是動態分頁內容溢出。
rendition:flow-scrolled-continuous
演繹版:流-滾動-連續
Indicates the EPUB creator preference is to provide a scrolled view for overflow content, and that consecutive spine items with this property are to be rendered as a continuous scroll.
指示 EPUB 建立者首選項是為溢出內容提供滾動視圖,並且具有此屬性的連續主幹項將呈現為連續滾動。
rendition:flow-scrolled-doc
演繹版:flow-scrolled-doc
Indicates the EPUB creator preference is to provide a scrolled view for overflow content, and each spine item with this property is to be rendered as a separate scrollable document.
指示 EPUB 建立者首選項是為溢出內容提供滾動視圖,並且具有此屬性的每個主幹項都將呈現為單獨的可滾動文檔。

EPUB creators MUST NOT use more than one of these overrides on any given spine item.
EPUB 建立者不得在任何給定的主幹專案上使用多個這些覆蓋。

8.3.2 The rendition:align-x-center property
8.3.2 rendition:align-x-center 屬性

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 meta element without a refines attribute). It is only available as a spine override for individual EPUB content documents via the itemref element's properties attribute.
不得為所有 EPUB 內容文件(即,在沒有 refines 屬性的 meta 元素中)全域設置該屬性。它只能通過 itemref 元素的 properties 屬性作為單個 EPUB 內容文檔的主幹覆蓋。

Note 注意

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 解決方案。

9. Media overlays 9. 媒體疊加

9.1 Introduction 9.1 引言

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內容文檔同步。

9.2 Media overlay documents
9.2 媒體疊加文檔

9.2.1 Media overlay document requirements
9.2.1 媒體疊加文檔要求

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 內容文件。

9.2.2 Media overlay document definition
9.2.2 媒體疊加文檔定義

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] 中。

9.2.2.1 The smil element
9.2.2.1 smil 元素

The smil element encapsulates all the information in an media overlay document.
smil 元素將所有資訊封裝在媒體疊加文檔中。

Element Name: 元素名稱:

smil

Usage: 用法:

REQUIRED root element [xml] of the media overlay document.
媒體疊加文件的 REQUIRED 根元素 [ xml]。

Attributes: 屬性:
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 疊加中的結構語義。

Content Model: 內容模型:

In this order: 依此順序:

9.2.2.2 The head element
9.2.2.2 head 元素

The head element is the container for metadata in the media overlay document.
head 元素是媒體疊加文檔中元數據的容器。

Element Name: 元素名稱:

head

Usage: 用法:

The head element is the OPTIONAL first child of the smil element.
head 元素是 smil 元素的 OPTIONAL 第一個子元素。

Attributes: 屬性:

None 沒有

Content Model: 內容模型:

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 元素是可選的。

9.2.2.3 The metadata element
9.2.2.3 metadata 元素

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 元素是一個擴展點,允許包含來自任何元資訊結構化語言的元數據。

Element Name: 元素名稱:

metadata

Usage: 用法:

As a child of the head element.
作為 head 元素的子元素。

Attributes: 屬性:

None 沒有

Content Model: 內容模型:

[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 元素是為滿足自定義元數據要求而提供的。

9.2.2.4 The body element
9.2.2.4 body 元素

The body element is the starting point for the presentation contained in the media overlay document. It contains the main sequence of par and seq elements.
body 元素是媒體疊加文檔中包含的演示文稿的起點。它包含和 seq 元素的 par 主序列。

Element Name: 元素名稱:

body

Usage: 用法:

The body element is a REQUIRED child of the smil element. It follows the head element, when that element is present.
元素 bodysmil 元素的 REQUIRED 子元素。當元素存在時,它跟隨 head 該元素。

Attributes: 屬性:
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 字串串(可選)。

Content Model: 內容模型:

In any order: 按任意順序:

  • seq [0 or more]

  • par [0 or more]

MUST include at least one par or seq.
必須至少包含或 par seq .

9.2.2.5 The seq element
9.2.2.5 seq 元素

The seq element is a sequential time container for media objects and/or child time containers.
seq 元素是媒體物件和/或子時間容器的順序時間容器。

Element Name: 元素名稱:

seq

Usage: 用法:

One or more seq elements MAY occur as children of the body element and of the seq element.
一個或多個 seq 元素可以作為 body 元素和 seq 元素的子元素出現。

Attributes: 屬性:
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 覆蓋結構。

Content Model: 內容模型:

In any order: 按任意順序:

  • seq [0 or more]

  • par [0 or more]

MUST include at least one par or seq.
必須至少包含或 par seq .

9.2.2.6 The par element
9.2.2.6 par 元素

The par element is a parallel time container for media objects.
par 元素是媒體物件的並行時間容器。

Element Name: 元素名稱:

par

Usage: 用法:

One or more par elements MAY occur as children of the body and seq elements.
一個或多個 par 元素可以作為 body and seq 元素的子元素出現。

Attributes: 屬性:
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],在文件範圍內必須是唯一的。

Content Model: 內容模型:

In any order: 按任意順序:

9.2.2.7 The text element
9.2.2.7 text 元素

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 audio element, textual content referred to by this element may be rendered via text-to-speech.
text 元素引用 EPUB 內容文件中的元素。 text 元素通常引用文本元素,但也可以引用其他 EPUB 內容文檔媒體元素。在沒有同級 audio 元素的情況下,此元素引用的文本內容可以通過文本轉語音呈現。

Element Name: 元素名稱:

text

Usage: 用法:

As a REQUIRED child of the par element.
作為 par 元素的 REQUIRED 子元素。

Attributes: 屬性:
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],在文件範圍內必須是唯一的。

Content Model: 內容模型:

Empty 

Note 注意

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 中的文字元素)。

Note 注意

[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 [htmlvideo element), referencing such media may have unpredictable results.
[ epub-rs-33] 不再為閱讀系統提供定時媒體播放(即引用媒體的自動啟動)的指導。儘管 text 元素的 src 屬性可能引用嵌入的定時媒體(例如,通過 [ html] video 元素),但引用此類媒體可能會產生不可預知的結果。

9.2.2.8 The audio element
9.2.2.8 audio 元素

The audio element represents a clip of audio media.
audio 元素表示音訊媒體的剪輯。

Element Name: 元素名稱:

audio

Usage: 用法:

An OPTIONAL child of the par element.
par 元素的 OPTIONAL 子元素。

Attributes: 屬性:
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 指定的起始偏移量之後。

Content Model: 內容模型:

Empty 

9.3 Creating media overlays
9.3 創建媒體疊加

9.3.1 Introduction 9.3.1 簡介

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 body (used for the main sequence), seq (sequence) and par (parallel). (Refer to 9.2.2 Media overlay document definition for more information on these and other SMIL elements.)
主要用於構建媒體疊加層的 SMIL 元素是 body (用於主序列)、 seq (序列)和 par (並行)。(有關這些元素和其他 SMIL 元素的更多資訊,請參閱 9.2.2 媒體覆蓋文檔定義。

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 audio element and a text element. Because 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 clipBeginclipEnd 屬性以指示剪輯中的特定偏移量。

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 疊加結構)。

9.3.2 Relationship to the EPUB content document
9.3.2 與 EPUB 內容文檔的關係

Note 注意

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 內容文件。閱讀系統分頁策略的差異意味著某些閱讀系統僅支援一種或另一種佈局格式的媒體疊加。

9.3.2.1 Overlay structure
9.3.2.1 疊加結構

The body of a media overlay document consists of two elements: the par element and the seq element. The ordering of these elements represents how reading systems render the content in the corresponding EPUB content documents during playback.
body 媒體疊加文檔由兩個元素組成: par 元素和 seq 元素。這些元素的順序表示閱讀系統在播放過程中如何呈現相應 EPUB 內容文檔中的內容。

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 text element) and audio to synchronize (in the audio element) during playback.
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 元素不提供同步指令,因此此屬性允許閱讀系統將片段與文本中的位置進行匹配。

Note 注意

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 可跳過性和可轉載性)或自定義閱讀模式以適應表格等結構。

9.3.2.2 Referencing document fragments
9.3.2.2 引用文檔片段

Both the epub:textref attribute and the text element's 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 建立者可以使用其他片段標識符方案,但讀取系統可能不支援此類標識符。

9.3.2.3 Overlay granularity
9.3.2.3 疊加粒度

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 text elements' src attributes and the seq elements' 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 元素,則媒體疊加中可以實現更精細的粒度。更精細的粒度為使用者提供了更精確的結果,以便在按單詞或短語導航以及搜索文本時同步播放,但會增加媒體疊加文檔的檔大小。不依賴於元素存在的片段標識符方案可以在支持的情況下提供更精細的粒度。

9.3.2.4 Text-to-speech rendering
9.3.2.4 文字轉語音渲染

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 par element omits its audio element, its text 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.
當媒體疊加 par 元素省略其 audio 元素時,其 text 元素可以通過 TTS 在閱讀系統中呈現。如果文本片段不適合 TTS 呈現(例如,不是文本元素和/或沒有文本回退),則可能會產生意外結果。

Note 注意

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]。

9.3.3 Structural semantics in overlays
9.3.3 疊加中的結構語義

To express structural semantics in media overlay documents, EPUB creators MAY specify the epub:type attribute on par, seq, and body elements.
為了在媒體疊加文檔中表達結構語義,EPUB 建立者可以指定、 par seqbody 元素的 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 屬性的適用詞彙關聯機制來定義其他語義。

9.3.4 Associating style information
9.3.4 關聯樣式資訊

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-classplayback-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出版物。

9.3.5 Media overlays packaging
9.3.5 媒體疊加打包

9.3.5.1 Including media overlays
9.3.5.1 包括媒體疊加

If an EPUB content document is wholly or partially referenced by a media overlay document, then its manifest item element MUST specify a 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

9.3.5.2 Overlays package metadata
9.3.5.2 覆蓋包元數據

EPUB creators MUST specify the duration of the entire EPUB publication in the package document using a meta element with the duration property.
EPUB 建立者必須使用帶有該 duration 屬性的 meta 元素在包文檔中指定整個 EPUB 發佈的持續時間。

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 秒。

Note 注意

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 內容文件元素。

Note 注意

The media: prefix is reserved for inclusion of these properties in package metadata.
media: 前綴保留用於將這些屬性包含在包元數據中。

9.4 Skippability and escapability
9.4 可跳過性和可逃避性

9.4.1 Skippability 9.4.1 可跳過性

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] 中的術語,閱讀系統最有可能提供可跳過性選項。

9.4.2 Escapability 9.4.2 轉載能力

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] 中的術語,閱讀系統最有可能提供可逃避性的選項。

Note 注意

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 建立者應避免識別嵌套的可迴避結構,直到獲得更好的支援。

9.5 Navigation document overlays
9.5 導航文檔疊加

This section is non-normative.
本節是非規範性的。

As the EPUB navigation document is an XHTML content document, EPUB creators may associate a media overlay document with it. Unlike traditional XHTML content documents, however, reading systems must present the EPUB navigation document to users even when it is not included in the spine (see Navigation document processing [epub-rs-33]). As a result, the method in which an associated media overlay behaves can change depending on the context:
由於EPUB導航文檔是 XHTML 內容文檔,因此 EPUB 建立者可以將媒體疊加文檔與其相關聯。然而,與傳統的 XHTML 內容文檔不同,閱讀系統必須向用戶呈現 EPUB 導航文檔,即使它不包含在書脊中(請參閱導航文檔處理 [ epub-rs-33])。因此,關聯媒體疊加的行為方式可能會根據上下文而改變:

Note 注意

Specific implementation details are beyond the scope of this specification. The DAISY Media Overlays Playback Requirements document describes best practices for EPUB creators and provides recommendations for reading system developers.
具體的實現細節超出了本規範的範圍。DAISY 媒體疊加播放要求文檔介紹了 EPUB 建立者的最佳實踐,併為閱讀系統開發人員提供了建議。

10. Accessibility 10. 可訪問性

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 出版物越容易獲得,它們的潛在受眾就越大。

Note 注意

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 的生產者參考最新的可訪問性要求)。

11. Security and privacy 11. 安全和隱私

11.1 Overview 11.1 概述

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 建立者識別和減輕這些風險。

Note 注意

For the risks associated with reading systems, refer to the security and privacy section of [epub-rs-33].
有關與讀取系統相關的風險,請參閱 [ epub-rs-33] 的安全和隱私部分。

11.2 Threat model 11.2 威脅模型

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 建立者和使用者需要注意的一些更重要的攻擊媒介包括:

Embedding of remote resources
嵌入遠端資源

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-PolicyX-Frame-Options .

Linking to external resources
連結到外部資源

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 建立者不想要的資源。

Including malicious content
包含惡意內容

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 建立者無法全面審查內容,則使用第三方內容(例如遊戲和測驗)也可能導致安全和隱私問題。

Allowing scripts network access
允許文本網路訪問

When scripts can access a device's network, it provides a variety channels to exploit the user:
當文稿可以存取裝置的網路時,它會提供各種通道來利用使用者:

  • collecting information about the user and their activities, whether malicious or not;
    收集有關使用者及其活動的信息,無論是否惡意;
  • attempting to access the file system and local storage to harvest information;
    嘗試存取檔案系統和本地儲存以收集資訊;
  • phishing attempts (e.g., making an EPUB content document appear like a trusted web site to get the user to submit login information); and
    網路釣魚企圖(例如,使 EPUB 內容文檔看起來像一個受信任的網站,以讓使用者提交登錄資訊);和
  • injecting malicious content from external sites into the EPUB publication.
    將來自外部網站的惡意內容注入 EPUB 發佈。

Network access may allow third-party content to exploit the user even if it was not the EPUB creator's intent.
網路訪問可能允許第三方內容利用使用者,即使這不是 EPUB 建立者的意圖。

Securing content with digital rights management
使用數位版權管理保護內容

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:
這些攻擊的有效性通常還取決於誘騙使用者相信他們正在與之交互的出版物來自可信賴的來源。這些欺騙可以採取以下形式:

Falsified publication information
偽造的出版資訊

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 出版物中的惡意表格、連結和其他內容,認為它們來自可靠的來源。

Spoofed platforms 欺騙平臺

Malicious EPUB creators may also design their content to imitate or replicate a platform's experience to trick users into trusting their content.
惡意 EPUB 建立者還可能設計他們的內容來模仿或複製平台的體驗,以誘騙使用者信任他們的內容。

11.2.1 EPUB-specific features
11.2.1 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 建立者需要注意,他們僅使用此對象公開的信息來改進其內容的呈現(即,避免使用該資訊來分析使用者及其環境)。

11.3 Recommendations 11.3 建議

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 建立者都能實現這些級別的自我包含,但盡可能多地遵循這些做法仍將有利於整體用戶隱私和安全。

A. Unsupported features A. 不支援的功能

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.1 Under-implemented features
A.1 未實現的功能

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 建立者可以使用所述功能。

Note 注意

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 出版物中遇到未實現的功能,但不得將其視為違反標準(即不發出錯誤或警告)。

Caution 謹慎

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 建立者在使用這些功能時應認真考慮現在和將來可能出現的互操作性問題。

Note 注意

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.2 Deprecated features A.2 已棄用的功能

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 出版物中使用該功能。

Note 注意

EPUB conformance checkers should alert EPUB creators to the presence of deprecated features when encountered in EPUB publications.
EPUB 一致性檢查器應提醒 EPUB 建立者在 EPUB 出版物中遇到已棄用的功能。

B. Allowed external identifiers
B. 允許的外部識別碼

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 系統標識碼
  • application/mathml+xml
  • application/mathml-presentation+xml
  • application/mathml-content+xml
-//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

C. Expressing structural semantics
C. 表達結構語義

C.1 Introduction C.1 引言

This section is non-normative.
本節是非規範性的。

Structural semantics add additional meaning about the specific structural purpose an element plays. The epub:type 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 內容文檔和媒體疊加文檔中表達特定於域的語義,其攜帶的結構資訊補充了基礎詞彙表。

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 屬性附加到現有元素以添加所需的語義,而不是添加新元素。

C.2 The epub:type attribute
C.2 epub:type 屬性

Attribute Name: 屬性名稱:

epub:type

Namespace: 命名空間:

http://www.idpf.org/2007/ops

Usage: 用法:

Refer to the requirements for XHTML, SVG, and media overlays.
請參閱 XHTML、SVG 和媒體疊加的要求。

Value: 價值:

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] 中定義的字元集。

Caution 謹慎

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 詞彙關聯機制。

D. Vocabularies D. 詞彙

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 的詞彙表。

D.1 Vocabulary association mechanisms
D.1 詞彙聯想機制

D.1.1 Introduction D.1.1 導言

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 內容文件和媒體疊加文檔中使用此數據類型來添加結構語義,而 propertyrel 屬性則使用該數據類型來定義包文檔中的屬性和關係。

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.
以下各節提供有關屬性數據類型和詞彙關聯機制的其他詳細資訊。

D.1.2 The property data type
D.1.2 屬性數據類型

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 前綴組成,該前綴與引用之間用冒號分隔。

(EBNF productions ISO/IEC 14977)
(EBNF 生產 ISO/IEC 14977)

All terminal symbols are in the Unicode Block 'Basic Latin' (U+0000 to U+007F).
所有終端符號均採用 Unicode 塊「基本拉丁語」 (U+0000 至 U+007F) 。
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 建立者從屬性值中省略前綴時,表示的引用表示該屬性的預設詞彙表中的術語。

D.1.3 Default vocabularies
D.1.3 預設詞彙表

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 分配前置綴。

Note 注意

Refer to the definition of each attribute that takes a property data type for more information about its default vocabulary.
有關其預設詞彙的詳細資訊,請參閱採用屬性數據類型的每個屬性的定義。

D.1.4 The prefix attribute
D.1.4 prefix 屬性

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 映射的空格分隔清單:

(EBNF productions ISO/IEC 14977)
(EBNF 生產 ISO/IEC 14977)

All terminal symbols are in the Unicode Block 'Basic Latin' (U+0000 to U+007F).
所有終端符號均採用 Unicode 塊「基本拉丁語」 (U+0000 至 U+007F) 。
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 中聲明該屬性。

Note 注意

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 內容文件中。

<htmlprefix="…"
        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] 元素。

D.1.5 Reserved prefixes D.1.5 保留前綴

Caution 謹慎

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 建立者可以使用的保留前綴取決於上下文:

Package document 包裝文件

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#
Structural Semantics 結構語義

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#

D.2 Property field definitions
D.2 屬性欄位定義

The fields in the vocabulary definition tables have the following implicit requirements:
字彙定義表中的欄位具有以下隱式要求:

Allowed Values 允許的值

Specifies the REQUIRED type of value using [xmlschema-2] datatypes.
使用 [ xmlschema-2] 資料類型指定值的 REQUIRED 類型。

Applies To 適用於

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 屬性,將顯示此欄位。

Cardinality 基數

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的屬性。

Description 描述

Describes the purpose of the property and specifies any additional usage requirements that EPUB creators must follow.
描述屬性的用途,並指定 EPUB 建立者必須遵循的任何其他使用要求。

Example 

Provides non-normative usage examples.
提供非規範用法示例。

Extends 延伸

Identifies what EPUB creators MAY associate the property with.
標識 EPUB 建立者可以將屬性關聯到哪些內容。

This field appears for properties that define primary expressions and subexpressions and relationships.
對於定義主表達式和子運算式以及關係的屬性,將顯示此欄位。

Name 名字

Specifies the name of the property as it MUST appear in the metadata.
指定屬性的名稱,因為它必須出現在元數據中。

D.3 Meta properties vocabulary
D.3 元屬性詞彙

The properties in this vocabulary are usable in the meta element's 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 meta element carrying a property defined in this section MUST have a 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/#

D.3.1 alternate-script D.3.1 替代腳本

Name: 名稱: alternate-script
Description: 描述:

The alternate-script property provides an alternate expression of the associated property value in a different language and/or script. The language tags of the alternate-script property and its associated property — as expressed by their respective in-scope xml:lang attributes — MUST NOT be the same.
alternate-script 屬性以不同的語言和/或腳本提供關聯屬性值的替代表達式。alternate-script 屬性及其關聯屬性的語言標記(由其各自的作用域內 xml:lang 屬性表示)不得相同。

This property is typically attached to creator and title properties for internationalization purposes.
此屬性通常附加到 creatortitle 屬性,以便進行國際化。

Allowed value(s): 允許的值: xsd:string
Cardinality: 基數: zero or more
Extends: 延伸: All properties. 所有屬性。

D.3.2 authority D.3.2 許可權

Name: 名稱: authority
Description: 描述:

The authority property identifies the system or scheme the referenced element's value is drawn from.
authority 屬性標識從中提取引用元素值的系統或方案。

Allowed value(s): 允許的值: xsd:string
Note 注意

The former IDPF EPUB 3 Working Group maintained a registry of subject authorities for use with this property. This Working Group no longer maintains the registry.
前IDPF EPUB 3工作組維護了一個用於該財產的主體當局登記冊。該工作組不再維持登記冊。

Cardinality: 基數: zero or one
Extends: 延伸: dc:subject

D.3.3 belongs-to-collection
D.3.3 屬於集合

Name: 名稱: belongs-to-collection
Description: 描述:

The belongs-to-collection property identifies the name of a collection to which the EPUB publication belongs. An EPUB publication MAY belong to one or more collections.
belongs-to-collection 屬性標識 EPUB 出版物所屬的集合的名稱。EPUB 出版物可能屬於一個或多個集合。

It is also possible to chain these properties using the refines attribute to indicate that one collection is itself a member of another collection.
還可以使用屬性 refines 連結這些屬性,以指示一個集合本身是另一個集合的成員。

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 dcterms:identifier property must carry this identifier.
為了允許閱讀系統組織館藏並避免命名衝突(例如,不相關的館藏可能共用相似的名稱,或者可以發佈館藏的不同版本),EPUB 建立者應提供唯一標識館藏實例的標識符。 dcterms:identifier 屬性必須帶有此標識碼。

The collection MAY more precisely define its nature by attaching a collection-type property.
集合可以通過附加 collection-type 屬性來更精確地定義其性質。

The position of the EPUB publication within the collection MAY be provided by attaching a group-position property.
EPUB 出版物在館藏中的位置可以通過附加 group-position 屬性來提供。

Allowed value(s): 允許的值: xsd:string
Cardinality: 基數: zero or more
Extends: 延伸: Applies to the EPUB publication and can refine other instances of itself.
適用於 EPUB 發佈,並可以優化其自身的其他實例。

D.3.4 collection-type D.3.4 集合類型

Name: 名稱: collection-type
Description: 描述:

The collection-type property indicates the form or nature of a collection.
collection-type 屬性指示集合的形式或性質。

When the collection-type value is drawn from a code list or other formal enumeration, EPUB creators SHOULD attach a scheme attribute to identify its source.
當從代碼清單或其他正式枚舉中提取 collection-type 值時,EPUB 建立者應附加屬性 scheme 以標識其來源。

This specification also defines the following collection types when no scheme is specified:
當未指定方案時,此規範還定義了以下集合類型:

series

A sequence of related works that are formally identified as a group, typically open-ended with works issued individually over time.
一系列相關作品被正式標識為一組,通常是開放式的,作品隨時間推移單獨發行。

set

A finite collection of works that together constitute a single intellectual unit, typically issued together and able to be sold as a unit.
有限的作品集合,共同構成一個單一的知識單元,通常一起發行並能夠作為一個單元出售。

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.
儘管不需要閱讀系統來支持這些值,但指定它們提供了以更有意義的方式對相關 EPUB 出版物進行分組的選項。

Allowed value(s): 允許的值: xsd:string
Cardinality: 基數: zero or one
Extends: 延伸: belongs-to-collection

D.3.5 display-seq D.3.5 顯示序列

Name: 名稱: display-seq
Description: 描述:

The display-seq property indicates the numeric position in which to display the current property relative to identical metadata properties.
display-seq 屬性指示相對於相同元數據屬性顯示當前屬性的數位位置。

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. 所有屬性。

D.3.6 file-as D.3.6 檔作為

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. 所有屬性。

D.3.7 group-position D.3.7 分組位置

Name: 名稱: group-position
Description: 描述:

The group-position property indicates the numeric position in which the EPUB publication is ordered relative to other works belonging to the same group (whether all EPUB publications or not).
group-position 屬性指示 EPUB 出版物相對於屬於同一組的其他作品(無論是否為所有 EPUB 出版物)進行排序的數位位置。

EPUB creators can attach the group-position property to any metadata property that establishes the group but it is typically associated with the belongs-to-collection property.
EPUB 建立者可以將 group-position 屬性附加到建立組的任何元數據屬性,但它通常與 belongs-to-collection 屬性相關聯。

An EPUB publication can belong to more than one group.
一個 EPUB 出版物可以屬於多個組。

Allowed value(s): 允許的值: A single xsd:unsignedInt or series of decimal-separated numbers (e.g., 1 or 2.2.1).
單個 xsd:unsignedInt 或一系列以十進位分隔的數位(例如, 12.2.1 )。
Cardinality: 基數: zero or one
Extends: 延伸: All properties. 所有屬性。

D.3.8 identifier-type D.3.8 標識符類型

Name: 名稱: identifier-type
Description: 描述:

The identifier-type property indicates the form or nature of an identifier.
identifier-type 屬性指示 identifier .

When the identifier-type value is drawn from a code list or other formal enumeration, EPUB creators SHOULD attach a scheme attribute to identify its source.
當從代碼清單或其他正式枚舉中提取 identifier-type 值時,EPUB 建立者應附加屬性 scheme 以標識其來源。

Allowed value(s): 允許的值: xsd:string
Cardinality: 基數: zero or one
Extends: 延伸: dc:identifier, dc:source

D.3.9 meta-auth (deprecated)
D.3.9 元身份驗證(已棄用)

Use of this property is deprecated.
不推薦使用此屬性。

Refer to the meta-auth property definition in [epubpublications-30] for more information.
有關詳細資訊,請參閱 [ epubpublications-30] 中的 meta-auth 屬性定義。

D.3.10 role D.3.10 角色

Name: 名稱: role
Description: 描述:

The role property describes the role of a creator, contributor or publisher in the creation of an EPUB publication.
role 屬性描述了 contributorpublisher 在 EPUB 出版物的創建中的作用 creator

When the role value is drawn from a code list or other formal enumeration, EPUB creators SHOULD attach a scheme attribute to identify its source.
當從代碼清單或其他正式枚舉中提取 role 值時,EPUB 建立者應附加屬性 scheme 以標識其來源。

When attaching multiple roles to an individual or organization, the importance of the roles should match the document order of their containing meta elements (i.e., the first meta element encountered should contain the most important role).
將多個角色附加到個人或組織時,角色的重要性應與其包含 meta 元素的文檔順序相匹配(即,遇到的第一個 meta 元素應包含最重要的角色)。

Allowed value(s): 允許的值: xsd:string
Cardinality: 基數: zero or more
Extends: 延伸: dc:contributor, dc:creator, dc:publisher

D.3.11 source-of D.3.11 來源

Name: 名稱: source-of
Description: 描述:

The source-of property indicates a unique aspect of an adapted source resource that has been retained in the EPUB publication.
source-of 屬性表示 EPUB 出版物中保留的改編源資源的獨特方面。

This specification defines the pagination value to indicate that the referenced dc:source element is the source of the pagebreak properties defined in the content.
此規範定義的 pagination 值指示引用 dc:source 的元素是內容中定義的 pagebreak 屬性的源。

Allowed value(s): 允許的值: pagination
Cardinality: 基數: zero or one
Extends: 延伸: dc:source
Note 注意

See [epub-a11y-tech-11] for information on how to provide accessible page navigation.
請參閱 [ epub-a11y-tech-11] 以獲取有關如何提供可訪問頁面導航的資訊。

D.3.12 term D.3.12 術語

Name: 名稱: term
Description: 描述:

The term property provides a subject code.
term 屬性提供主題代碼。

Allowed value(s): 允許的值: xsd:string
Cardinality: 基數: zero or one
Extends: 延伸: dc:subject

D.3.13 title-type D.3.13 標題類型

Name: 名稱: title-type
Description: 描述:

The title-type property indicates the form or nature of a title.
title-type 屬性指示 title 的形式或性質。

When the title-type value is drawn from a code list or other formal enumeration, EPUB creators SHOULD attach a scheme attribute to identify its source. When a scheme is not specified, reading systems SHOULD recognize the following title type values: main, subtitle, short, collection, edition and expanded.
當從代碼清單或其他正式枚舉中提取 title-type 值時,EPUB 建立者應附加屬性 scheme 以標識其來源。如果未指定方案,閱讀系統應識別以下標題類型值: mainsubtitle short collection editionexpanded

Allowed value(s): 允許的值: xsd:string
Cardinality: 基數: zero or one
Extends: 延伸: dc:title

D.3.14 Examples D.3.14 示例

D.5 Package rendering vocabulary
D.5 包呈現詞彙表

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: ”前綴保留用於包呈現屬性,不必在包文檔中聲明。

Note 注意

Unlike the other vocabularies in this appendix, the properties in the Package Rendering Vocabulary consist of a mix of properties (expressed in meta elements) and spine overrides (expressed on itemref elements).
與本附錄中的其他詞彙表不同,「包呈現詞彙表」中的屬性由屬性(以 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
  • rendition:layout-pre-paginated
  • rendition:layout-reflowable
8.2.2.1 Layout 8.2.2.1 佈局
rendition:orientation
  • rendition:orientation-auto
  • rendition:orientation-landscape
  • rendition:orientation-portrait
8.2.2.2 Orientation 8.2.2.2 方向
rendition:spread
  • rendition:spread-auto
  • rendition:spread-both
  • rendition:spread-landscape
  • rendition:spread-none
  • rendition:spread-portrait (Deprecated)  rendition:spread-portrait (已棄用)
8.2.2.3 Synthetic spreads
8.2.2.3 合成點差
  • rendition:page-spread-center
  • rendition:page-spread-left
  • rendition:page-spread-right
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
  • rendition:flow-paginated
  • rendition:flow-scrolled-continuous
  • rendition:flow-scrolled-doc
  • rendition:flow-auto
8.3.1 The rendition:flow property
8.3.1 rendition:flow 屬性
  • rendition:align-x-center
8.3.2 The rendition:align-x-center property
8.3.2 rendition:align-x-center 屬性

D.5.1 Custom rendering properties
D.5.1 自定義渲染屬性

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: 前綴。

Note 注意

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.
自訂屬性應僅解決特定於特定閱讀系統的呈現問題。此規範應進行擴展,以提供多個獨立讀取系統可以使用的擴展。

D.6 Manifest properties vocabulary
D.6 清單屬性詞彙表

The properties in this vocabulary are usable in the manifest item element's 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/#

D.6.1 cover-image D.6.1 封面圖片

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

D.6.2 mathml D.6.2 數學

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

D.6.3 nav D.6.3 導航

D.6.4 remote-resources D.6.4 遠端資源

Name: 名稱: remote-resources
Description: 描述:

The remote-resources property indicates that the described publication resource contains one or more internal references to other publication resources that are located outside of the EPUB container.
remote-resources 屬性指示所描述的發佈資源包含對位於 EPUB 容器外部的其他發佈資源的一個或多個內部引用。

Refer to 3.6 Resource locations for more information.
有關詳細資訊,請參閱 3.6 資源位置。

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

D.6.5 scripted D.6.5 腳本化

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

D.6.6 svg

Name: 名稱: svg
Description: 描述:

The svg property indicates that the described publication resource embeds one or more instances of SVG markup.
svg 屬性指示所描述的發佈資源嵌入了一個或多個SVG標記實例。

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] img, object or iframe element).
當 SVG 標記直接包含在資源中時,必須設置此屬性,並且可以在從資源(例如,從 [ html] img objectiframe 元素)引用 SVG 時設定此屬性。

Applies to: 適用於: XHTML content documents; the value is implied for SVG content documents.
XHTML內容文檔;該值是 SVG 內容文件的隱含值。
Cardinality: 基數: Zero or more

D.6.7 switch D.6.7 開關

Name: 名稱: switch
Description: 描述:

The switch property indicates that the described publication resource contains one or more instances of the deprecated epub:switch element.
switch 屬性指示所描述的發佈資源包含已棄用 epub:switch 元素的一個或多個實例。

Applies to: 適用於: XHTML content documents.
XHTML 內容文件。
Cardinality: 基數: Zero or more

D.7 Spine properties vocabulary
D.7 脊柱屬性詞彙

The properties in this vocabulary are usable in the spine itemref element's 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/#

D.7.1 page-spread-left D.7.1 頁展開左

Name: 名稱: page-spread-left
Description: 描述:

The page-spread-left property indicates that the first page of the associated item element's EPUB content document represents the left-hand side of a two-page spread.
page-spread-left 屬性指示關聯 item 元素的 EPUB 內容文檔的第一頁表示兩頁跨頁的左側。

The rendition:page-spread-left property is an alias for this property. Refer to 8.2.2.4 Spread placement for more information about their use.
rendition:page-spread-left 屬性是此屬性的別名。有關其使用的更多資訊,請參閱 8.2.2.4 點差放置。

D.7.2 page-spread-right D.7.2 頁面跨頁權

Name: 名稱: page-spread-right
Description: 描述:

The page-spread-right property indicates that the first page of the associated item element's EPUB content document represents the right-hand side of a two-page spread.
page-spread-right 屬性指示關聯 item 元素的 EPUB 內容文檔的第一頁表示兩頁跨頁的右側。

The rendition:page-spread-right property is an alias for this property. Refer to 8.2.2.4 Spread placement for more information about their use.
rendition:page-spread-right 屬性是此屬性的別名。有關其使用的更多資訊,請參閱 8.2.2.4 點差放置。

D.7.3 Examples D.7.3 示例

D.8 Media overlays vocabulary
D.8 媒體疊加詞彙

The properties in this vocabulary are usable in the meta element's 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: 保留用於此詞彙表中的屬性,不必在包文檔中聲明。

D.8.1 active-class D.8.1 活動類

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>

D.8.2 duration D.8.2 會期

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.
必須是 [ smil3] 時鐘值。

Cardinality: 基數: Exactly one for the EPUB publication and for each media overlay document.
EPUB 出版物和每個媒體疊加文檔正好一個。
Example: 例: <meta property="media:duration">1:36:20</meta>

D.8.3 narrator D.8.3 敘述者

Name: 名稱: narrator
Description: 描述: Name of the narrator.
講述人的姓名。
Allowed value(s): 允許的值: xsd:string
Cardinality: 基數: Zero or more
Example: 例: <meta property="media:narrator">Joe Speaker</meta>

D.8.4 playback-active-class
D.8.4 播放活動類

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>

E. Prefixed CSS properties
E. 帶前綴的 CSS 屬性

This appendix describes the prefixed CSS properties supported by EPUB.
本附錄介紹了 EPUB 支援的前綴 CSS 屬性。

Note 注意

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 建立者使用不帶前綴的版本來獲取較新的功能。

E.1 CSS writing modes E.1 CSS寫作模式

This section describes the -epub- prefixed properties for [css-writing-modes-3].
本節介紹 [ css-writing-modes-3] -epub- 的前綴屬性。

E.1.1 The -epub-text-orientation property
E.1.1 -epub-text-orientation 屬性

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-rightrotate-normal 關鍵字。下表指定了指定時的效果。

Deprecated value 已棄用的值 Value to be used
要使用的值
vertical-right mixed
rotate-right sideways
rotate-normal sideways

E.1.2 The -epub-writing-mode property
E.1.2 -epub-writing-mode 屬性

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

E.1.3 The -epub-text-combine-horizontal and -epub-text-combine properties
E.1.3 -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 無等價物

E.2 CSS text level 3
E.2 CSS 文字級別 3

This section describes the -epub- prefixed properties (and one prefixed value) for [css-text-3].
本節介紹 [ css-text-3] -epub- 的前綴屬性(和一個前綴值)。

E.2.1 The -epub-hyphens property
E.2.1 -epub-hyphens 屬性

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 中不再支援該值,並且沒有等效的值來代替它。

E.2.2 The -epub-line-break property
E.2.2 -epub-line-break 屬性

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
汽車 |鬆散 |正常 |嚴格

E.2.3 The -epub-text-align-last property
E.2.3 -epub-text-align-last 屬性

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
汽車 |開始 |完 |左 |右 |中心 |辯護

E.2.4 The -epub-word-break property
E.2.4 -epub-word-break 屬性

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
正常 |保持全部 |全部中斷

E.2.5 The text-transform property
E.2.5 text-transform 屬性

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 效果。

E.3 CSS text decoration level 3
E.3 CSS文本修飾等級3

This section describes the -epub- prefixed properties for [css-text-decor-3].
本節介紹 [ css-text-décor-3] -epub- 的前綴屬性。

E.3.1 The -epub-text-emphasis-color Property
E.3.1 -epub-text-emphasis-color 屬性

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>

E.3.2 The -epub-text-emphasis-position property
E.3.2 -epub-text-emphasis-position 屬性

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 ]
[ 上 | 下 ] && [ 右 | 左 ]

E.3.3 The -epub-text-emphasis-style property
E.3.3 -epub-text-emphasis-style 屬性

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>

E.3.4 The -epub-text-underline-position property
E.3.4 -epub-text-underline-position 屬性

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 效果。

F. The viewport meta tag F. viewport meta 標籤

F.1 Introduction F.1 引言

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.
該語法有意保持盡可能通用,因為它不在本規範的範圍內,無法定義所有可能的屬性和值。它僅定義定義屬性和值對的基本要求以及表達式之間可能的分隔符。

F.2 Syntax F.2 語法

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 名字
The value of the name attribute [html] after whitespace normalization [xml] MUST be viewport.
空白規範化 [ xml] 後的 name 屬性 [ html] 的值必須是 viewport
content 內容

The value of the content attribute [html] after whitespace normalization [xml] MUST be of the following form:
空白規範化 [ xml] 後的 content 屬性 [ html] 的值必須採用以下格式:

(EBNF productions ISO/IEC 14977)
(EBNF 生產 ISO/IEC 14977)

All terminal symbols are in the Unicode Block 'Basic Latin' (U+0000 to U+007F).
所有終端符號均採用 Unicode 塊「基本拉丁語」 (U+0000 至 U+007F) 。
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 任何其他屬性沒有限制。

Note 注意

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 建立者使用 heightwidth 以外的屬性,並且不包含這些屬性的值,但強烈建議不要使用此類屬性。設置其他屬性可能會對固定布局文檔的呈現產生意想不到的後果。

G. Schemas G. 架構

This section is non-normative.
本節是非規範性的。

G.1 Package document schema
G.1 包文檔架構

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] 的處理器。

Note 注意

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 模式的多通道驗證來替代。

Note 注意

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.
這些架構可能會在本規範的正式修訂版之外進行更新和更正。因此,它們可能隨時更改。

G.2 OCF schemas G.2 OCF 模式

G.2.1 Schema for container.xml
G.2.1 架構 container.xml

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] 的處理器。

G.2.2 Schema for encryption.xml
G.2.2 架構 encryption.xml

The schema for encryption.xml files is included in [xmlsec-rngschema-20130411].
文件的 encryption.xml 架構包含在 [ xmlsec-rngschema-20130411] 中。

G.2.3 Schema for signatures.xml
G.2.3 架構 signatures.xml

The schema for signatures.xml files is included in [xmlsec-rngschema-20130411].
文件的 signatures.xml 架構包含在 [ xmlsec-rngschema-20130411] 中。

G.3 Media overlays schema
G.3 媒體覆蓋架構

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] 的處理器。

Note 注意

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 模式的多通道驗證來替代。

H. Detailed examples H. 詳細實例

This section is non-normative.
本節是非規範性的。

H.1 Resources H.1 資源

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 link 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.
該資源是元數據記錄,存儲在 EPUB 容器中。它通過包文檔元數據中的元素 link 進行連結。因此,它是清單平面上的鏈接資源(即未在清單中列出)。它不是任何其他飛機的一部分。

https://www.example.org/meta/data2.xml

The resource is a metadata record, stored remotely. It is linked via a link 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 進行連結。因此,它是清單平面上的鏈接資源(即,它未在清單中列出)。它不是任何其他飛機的一部分。

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 示例。

H.2 Scripting contexts H.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:
從這些例子中可以看出:

H.3 Packaged EPUB H.3 包裝 EPUB

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>

H.4 Clock values H.4 時鐘值

The following are examples of allowed clock values:
以下是允許的時鐘值的範例:

I. Media type registrations
一、媒體類型註冊

I.1 The application/oebps-package+xml media type
I.1 application/oebps-package+xml 介質類型

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) 維護和定義。

MIME media type name:
MIME 媒體類型名稱:

application

MIME subtype name: MIME 型態名稱:

oebps-package+xml

Required parameters: 所需參數:

None. 沒有。

Optional parameters: 選擇參數:

None. 沒有。

Encoding considerations:
編碼注意事項:

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]。

Security considerations:
安全注意事項:

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 規範中沒有關於包文檔格式中的加密、簽名或身份驗證的當前規定。

Interoperability considerations:
互操作性注意事項:

None. 沒有。

Published specification:
已發佈的規範:

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 介質類型。

Applications which use this media type:
使用此媒體類型的應用程式:

This media type is in wide use for the distribution of ebooks in the EPUB format.
這種媒體類型廣泛用於分發EPUB格式的電子書。

Additional information: 附加資訊:
Magic number(s): 幻數:

none 沒有

File extension(s): 檔案延伸名:

.opf

Macintosh File Type Code(s):
Macintosh 檔案類型代碼:

TEXT 發簡訊

Fragment identifiers: 片段識別碼:

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/ 中定義。

Person & email address to contact for further information:
如需更多資訊,請聯繫的人員和電子郵件位址:

EPUB 3 Working Group (public-epub-wg@w3.org)
EPUB 3 工作組 (public-epub-wg@w3.org)

Intended usage: 有可能的使用:

COMMON 常見

Author/Change controller:
作者/更改控制器:

World Wide Web Consortium (W3C)
萬維網聯盟 (W3C)

I.2 The application/epub+zip media type
I.2 application/epub+zip 介質類型

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)維護和定義。

MIME media type name:
MIME 媒體類型名稱:

application

MIME subtype name: MIME 型態名稱:

epub+zip

Required parameters: 所需參數:

None. 沒有。

Optional parameters: 選擇參數:

None. 沒有。

Encoding considerations:
編碼注意事項:

OCF ZIP container files are binary files encoded in the application/zip media type.
OCF ZIP容器檔是以媒體類型編碼的 application/zip 二進位檔。

Security considerations:
安全注意事項:

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容器檔。

Interoperability considerations:
互操作性注意事項:

None. 沒有。

Published specification:
已發佈的規範:

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 媒體類型。

Applications that use this media type:
使用此媒體類型的應用程式:

This media type is in wide use for the distribution of ebooks in the EPUB format.
這種媒體類型廣泛用於分發EPUB格式的電子書。

Additional information: 附加資訊:
Magic number(s): 幻數:

0: PK 0x03 0x04, 30: mimetype, 38: application/epub+zip

File extension(s): 檔案延伸名:

OCF ZIP container files are most often identified with the extension .epub.
OCF ZIP 容器檔最常使用擴展名 .epub 標識。

Macintosh file type code(s):
Macintosh 檔案類型代碼:

ZIP

Fragment identifiers: 片段識別碼:

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/ 中定義。

Person & email address to contact for further information:
如需更多資訊,請聯繫的人員和電子郵件位址:

EPUB 3 Working Group (public-epub-wg@w3.org)
EPUB 3 工作組 (public-epub-wg@w3.org)

Intended usage: 有可能的使用:

COMMON 常見

Author/change controller:
作者/更改控制器:

World Wide Web Consortium (W3C)
萬維網聯盟 (W3C)

J. Index J. 索引

J.1 Terms defined by this specification
J.1 本規範定義的術語

J.2 Terms defined by reference
J.2 引用定義的術語

K. Change log K. 更改紀錄

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.
有關修訂期間解決的所有問題的清單,請參閱工作組的問題跟蹤器。

K.1 Substantive changes since Candidate Recommendation of 2023-02-21
K.1 自 2023-02-21 候選人推薦以來的實質性變化

K.2 Substantive changes since Candidate Recommendation of 2022-05-12
K.2 自 2022-05-12 候選人推薦以來的實質性變化

K.3 Substantive changes since EPUB 3.2
K.3 自 EPUB 3.2 以來的實質性變化

L. Acknowledgements L. 致謝

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 工作組的以下成員為本規範的制定做出了貢獻:

M. References M. 參考資料

M.1 Normative references M.1 規範性參考

[bcp47]
Tags for Identifying Languages. A. Phillips, Ed.; M. Davis, Ed.. IETF. September 2009. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc5646
用於識別語言的標記。A.菲力浦斯,編輯;M.大衛斯,編輯。IETF。2009年9月。當前最佳實踐。網址: https://www.rfc-editor.org/rfc/rfc5646
[bidi] [比迪]
Unicode Bidirectional Algorithm. Mark Davis; Ken Whistler. Unicode Consortium. 16 August 2022. Unicode Standard Annex #9. URL: https://www.unicode.org/reports/tr9/tr9-46.html
Unicode 雙向演算法。馬克·大衛斯;肯·惠斯勒。Unicode 聯盟。2022 年 8 月 16 日。Unicode 標準附件 #9。網址: https://www.unicode.org/reports/tr9/tr9-46.html
[charmod-norm] [charmod規範]
Character Model for the World Wide Web: String Matching. Addison Phillips et al. W3C. 11 August 2021. W3C Working Group Note. URL: https://www.w3.org/TR/charmod-norm/
萬維網的字元模型:字串匹配。艾迪生·菲力浦斯(Addison Phillips)等人W3C。2021年8月11日。W3C 工作組說明。網址: https://www.w3.org/TR/charmod-norm/
[css-text-3] [css-文本-3]
CSS Text Module Level 3. Elika Etemad; Koji Ishii; Florian Rivoal. W3C. 13 February 2023. W3C Candidate Recommendation. URL: https://www.w3.org/TR/css-text-3/
CSS 文字模組級別 3。埃利卡·埃特馬德;石井浩司;弗洛裡安·里沃爾。W3C的。2023年2月13日。W3C 候選推薦。網址: https://www.w3.org/TR/css-text-3/
[css-text-decor-3] [css-文本裝飾-3]
CSS Text Decoration Module Level 3. Elika Etemad; Koji Ishii. W3C. 5 May 2022. W3C Candidate Recommendation. URL: https://www.w3.org/TR/css-text-decor-3/
CSS 文字修飾模組級別 3。埃利卡·埃特馬德;石井浩司。W3C的。2022 年 5 月 5 日。W3C 候選推薦。網址: https://www.w3.org/TR/css-text-décor-3/
[css-writing-modes-3] [css-寫作模式-3]
CSS Writing Modes Level 3. Elika Etemad; Koji Ishii. W3C. 10 December 2019. W3C Recommendation. URL: https://www.w3.org/TR/css-writing-modes-3/
CSS 編寫模式等級 3.埃利卡·埃特馬德;石井浩司。W3C的。2019年12月10日。W3C 建議。網址: https://www.w3.org/TR/css-writing-modes-3/
[css2]
Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification. Bert Bos; Tantek Çelik; Ian Hickson; Håkon Wium Lie. W3C. 7 June 2011. W3C Recommendation. URL: https://www.w3.org/TR/CSS21/
級聯樣式表級別 2 修訂版 1 (CSS 2.1) 規範。伯特·博斯;坦泰克·切利克;伊恩·希克森;Håkon Wium Lie.W3C的。2011年6月7日。W3C 建議。網址: https://www.w3.org/TR/CSS21/
[csssnapshot] [css快照]
CSS Snapshot. URL: https://www.w3.org/TR/CSS/
CSS 快照。網址: https://www.w3.org/TR/CSS/
[datetime] [日期時間]
Date and Time Formats. W3C. 27 August 1998. W3C Working Group Note. URL: https://www.w3.org/TR/NOTE-datetime
日期和時間格式。W3C的。1998年8月27日。W3C 工作組說明。網址: https://www.w3.org/TR/NOTE-datetime
[dcterms] [DC術語]
DCMI Metadata Terms. DCMI Usage Board. DCMI. 20 January 2020. DCMI Recommendation. URL: https://www.dublincore.org/specifications/dublin-core/dcmi-terms/
DCMI 元數據條款。DCMI 使用板。DCMI.2020年1月20日。DCMI 建議。網址: https://www.dublincore.org/specifications/dublin-core/dcmi-terms/
[dom] [多姆]
DOM Standard. Anne van Kesteren. WHATWG. Living Standard. URL: https://dom.spec.whatwg.org/
DOM 標準。安妮·范·凱斯特倫(Anne van Kesteren)。什麼WG。生活水準。網址: https://dom.spec.whatwg.org/
[ecmascript]
ECMAScript Language Specification. Ecma International. URL: https://tc39.es/ecma262/multipage/
ECMAScript 語言規範。ECMA國際。網址: https://tc39.es/ecma262/multipage/
[epub-a11y-11]
EPUB Accessibility 1.1. George Kerscher; Matt Garrish; Charles LaPierre; Avneesh Singh; Gregorio Pellegrino. W3C. 13 April 2023. W3C Proposed Recommendation. URL: https://www.w3.org/TR/epub-a11y-11/
EPUB 可存取性 1.1.喬治·克舍爾;馬特·加里什;查理斯·拉皮埃爾;阿夫尼什·辛格;格雷戈里奧·佩萊格里諾。W3C的。2023年4月13日。W3C 建議。網址: https://www.w3.org/TR/epub-a11y-11/
[epub-rs-33]
EPUB Reading Systems 3.3. Ivan Herman; Matt Garrish; Dave Cramer. W3C. 13 April 2023. W3C Proposed Recommendation. URL: https://www.w3.org/TR/epub-rs-33/
EPUB 閱讀系統 3.3.伊萬·赫爾曼;馬特·加里什;戴夫·克萊默(Dave Cramer)。W3C的。2023年4月13日。W3C 建議。網址: https://www.w3.org/TR/epub-rs-33/
[epub-ssv-11] [格式 epub-ssv-11]
EPUB 3 Structural Semantics Vocabulary 1.1. Ivan Herman; Matt Garrish. W3C. 10 May 2023. W3C Working Group Note. URL: https://www.w3.org/TR/epub-ssv-11/
EPUB 3 結構語義詞彙 1.1.伊萬·赫爾曼;馬特·加里什。W3C的。2023年5月10日。W3C 工作組說明。網址: https://www.w3.org/TR/epub-ssv-11/
[epubcontentdocs-301]
EPUB Content Documents 3.0.1. Markus Gylling; William McCoy; Elika J. Etimad; Matt Garrish. IDPF. 26 June 2014. URL: https://idpf.org/epub/301/spec/epub-contentdocs-20140626.html
EPUB 內容文件 3.0.1.馬庫斯·吉林;威廉·麥考伊;埃利卡·埃蒂馬德(Elika J.Etimad);馬特·加里什。國內流離失所者。2014年6月26日。網址: https://idpf.org/epub/301/spec/epub-contentdocs-20140626.html
[epubpackages-32]
EPUB Packages 3.2. Matt Garrish; Dave Cramer. EPUB 3 Community Group. 08 May 2019. URL: https://www.w3.org/publishing/epub32/epub-packages.html
EPUB 套件 3.2.馬特·加里什;戴夫·克萊默(Dave Cramer)。EPUB 3 社區組。08 五月 2019.網址: https://www.w3.org/publishing/epub32/epub-packages.html
[epubpublications-30] [電子出版物-30]
EPUB Publications 3.0. Markus Gylling; William McCoy; Matt Garrish. IDPF. 11 October 2011. URL: https://idpf.org/epub/30/spec/epub30-publications-20111011.html
EPUB 出版物 3.0。馬庫斯·吉林;威廉·麥考伊;馬特·加里什。國內流離失所者。2011年10月11日。網址: https://idpf.org/epub/30/spec/epub30-publications-20111011.html
[epubpublications-301] [電子出版物-301]
EPUB Publications 3.0.1. Markus Gylling; William McCoy; Matt Garrish. IDPF. 26 June 2014. URL: https://idpf.org/epub/301/spec/epub-publications-20140626.html
EPUB 出版物 3.0.1。馬庫斯·吉林;威廉·麥考伊;馬特·加里什。國內流離失所者。2014年6月26日。網址: https://idpf.org/epub/301/spec/epub-publications-20140626.html
[fips-180-4] [FIPS-180-4系列]
FIPS PUB 180-4: Secure Hash Standard (SHS). U.S. Department of Commerce/National Institute of Standards and Technology. August 2015. National Standard. URL: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
FIPS PUB 180-4:安全哈希標準 (SHS)。美國商務部/美國國家標準與技術研究院。2015年8月。國家標準。網址: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
[geolocation] [地理位置]
Geolocation API. Marcos Caceres; Reilly Grant. W3C. 1 September 2022. W3C Recommendation. URL: https://www.w3.org/TR/geolocation/
地理位置 API。馬科斯·卡塞雷斯;賴利·格蘭特。W3C的。2022 年 9 月 1 日。W3C 建議。網址: https://www.w3.org/TR/geolocation/
[gif] [動圖]
Graphics Interchange Format. CompuServe Incorporated. 31 July 1990. URL: https://www.w3.org/Graphics/GIF/spec-gif89a.txt
圖形交換格式。CompuServe 公司。1990年7月31日。網址: https://www.w3.org/Graphics/GIF/spec-gif89a.txt
[html] [全文]
HTML Standard. Anne van Kesteren; Domenic Denicola; Ian Hickson; Philip Jägenstedt; Simon Pieters. WHATWG. Living Standard. URL: https://html.spec.whatwg.org/multipage/
HTML 標準。安妮·范·凱斯特倫;多米尼克·德尼科拉;伊恩·希克森;菲力浦·耶根斯泰特;西蒙·彼特斯(Simon Pieters)。什麼WG。生活水準。網址: https://html.spec.whatwg.org/multipage/
[html-rdfa]
HTML+RDFa 1.1 - Second Edition. Manu Sporny. W3C. 17 March 2015. W3C Recommendation. URL: https://www.w3.org/TR/html-rdfa/
HTML+RDFa 1.1 - 第二版。馬努·斯波尼(Manu Sporny)。W3C的。2015年3月17日。W3C 建議。網址: https://www.w3.org/TR/html-rdfa/
[infra] [下]
Infra Standard. Anne van Kesteren; Domenic Denicola. WHATWG. Living Standard. URL: https://infra.spec.whatwg.org/
基礎設施標準。安妮·范·凱斯特倫;多米尼克·德尼科拉。什麼WG。生活水準。網址: https://infra.spec.whatwg.org/
[iso8601] [國際標準化組織8601]
Representation of dates and times. ISO 8601:2004.. International Organization for Standardization (ISO). 2004. ISO 8601:2004. URL: http://www.iso.org/iso/catalogue_detail?csnumber=40874
日期和時間的表示。ISO 8601:2004..國際標準化組織(ISO)。2004. ISO 8601:2004。網址: http://www.iso.org/iso/catalogue_detail?csnumber=40874
[jpeg] [jpeg格式]
JPEG File Interchange Format. Eric Hamilton. C-Cube Microsystems. Milpitas, CA, USA. September 1992. URL: https://www.w3.org/Graphics/JPEG/jfif3.pdf
JPEG 檔案交換格式。埃裡克·漢密爾頓。C-Cube微系統。美國加利福尼亞州米爾皮塔斯。1992年9月。網址: https://www.w3.org/Graphics/JPEG/jfif3.pdf
[mathml3] [數學ML3]
Mathematical Markup Language (MathML) Version 3.0 2nd Edition. David Carlisle; Patrick D F Ion; Robert R Miner. W3C. 10 April 2014. W3C Recommendation. URL: https://www.w3.org/TR/MathML3/
數學標記語言 (MathML) 3.0 版第 2 版。大衛·卡萊爾;派翠克 D F 離子;羅伯特·米納(Robert R Miner)。W3C的。2014年4月10日。W3C 建議。網址: https://www.w3.org/TR/MathML3/
[mp3] [mp3格式]
Information technology — Coding of moving pictures and associated audio for digital storage media at up to about 1,5 Mbit/s — Part 3: Audio. ISO/IEC. August 1993. Published. URL: https://www.iso.org/standard/22412.html
資訊技術 — 以高達 1.5 Mbit/s 的速度對數位存儲介質的運動圖像和相關音訊進行編碼 — 第 3 部分:音訊。國際標準化組織/國際電工委員會。1993年8月。發表。網址: https://www.iso.org/standard/22412.html
[mp4] [mp4格式]
Information technology — Coding of audio-visual objects — Part 14: MP4 file format. ISO/IEC. January 2020. Published. URL: https://www.iso.org/standard/79110.html
資訊技術 — 視聽物件編碼 — 第 14 部分:MP4 檔格式。國際標準化組織/國際電工委員會。2020 年 1 月。發表。網址: https://www.iso.org/standard/79110.html
[mpeg4-audio] [MPEG4-音訊]
Information technology — Coding of audio-visual objects — Part 3: Audio. ISO/IEC. December 2019. Published. URL: https://www.iso.org/standard/76383.html
資訊技術 — 視聽物件編碼 — 第 3 部分:音訊。國際標準化組織/國際電工委員會。2019年12月。發表。網址: https://www.iso.org/standard/76383.html
[onix] [奧尼克斯]
ONIX for Books 3.0. URL: https://www.editeur.org/8/ONIX/
ONIX for Books 3.0 版。網址: https://www.editeur.org/8/ONIX/
[opentype] [開放類型]
OpenType specification. Microsoft. URL: http://www.microsoft.com/typography/otspec/default.htm
OpenType 規範。Microsoft。網址: http://www.microsoft.com/typography/otspec/default.htm
[opf-201] [OPF-201系列]
Open Packaging Format 2.0.1. IDPF. 04 September 2010. URL: https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm
開放打包格式 2.0.1.國內流離失所者。2010年9月4日。網址: https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm
[png] [巴布亞紐幾內亞]
Portable Network Graphics (PNG) Specification (Second Edition). Tom Lane. W3C. 10 November 2003. W3C Recommendation. URL: https://www.w3.org/TR/PNG/
可移植網路圖形 (PNG) 規範(第二版)。湯姆·萊恩。W3C的。2003年11月10日。W3C 建議。網址: https://www.w3.org/TR/PNG/
[push-api] [推送 api]
Push API. Peter Beverloo; Martin Thomson; Marcos Caceres. W3C. 30 June 2022. W3C Working Draft. URL: https://www.w3.org/TR/push-api/
推送 API。彼得·貝弗盧;馬丁·湯姆森;馬科斯·卡塞雷斯。W3C的。2022 年 6 月 30 日。W3C 工作草案。網址: https://www.w3.org/TR/push-api/
[rdfa-core] [RDFA核心]
RDFa Core 1.1 - Third Edition. Ben Adida; Mark Birbeck; Shane McCarron; Ivan Herman et al. W3C. 17 March 2015. W3C Recommendation. URL: https://www.w3.org/TR/rdfa-core/
RDFa 核心 1.1 - 第三版。本·阿迪達;馬克·伯貝克;肖恩·麥卡倫;伊萬·赫爾曼(Ivan Herman)等人W3C。2015年3月17日。W3C 建議。網址: https://www.w3.org/TR/rdfa-core/
[rfc2046]
Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types. N. Freed; N. Borenstein. IETF. November 1996. Draft Standard. URL: https://www.rfc-editor.org/rfc/rfc2046
多用途 Internet 郵件擴展 (MIME) 第二部分:媒體類型。N.釋放;N.博倫斯坦。IETF。1996年11月。標準草案。網址: https://www.rfc-editor.org/rfc/rfc2046
[RFC2119]
Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119
在 RFC 中用於指示需求級別的關鍵字。S.布拉德納。IETF。1997年3月。當前最佳實踐。網址: https://www.rfc-editor.org/rfc/rfc2119
[rfc2397]
The "data" URL scheme. L. Masinter. IETF. August 1998. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc2397
“數據”URL 方案。L.馬辛特。IETF。1998年8月。擬議標準。網址: https://www.rfc-editor.org/rfc/rfc2397
[rfc4329]
Scripting Media Types. B. Hoehrmann. IETF. April 2006. Informational. URL: https://www.rfc-editor.org/rfc/rfc4329
文本媒體類型。B.霍爾曼。IETF。2006年4月。資訊。網址: https://www.rfc-editor.org/rfc/rfc4329
[rfc7303]
XML Media Types. H. Thompson; C. Lilley. IETF. July 2014. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc7303
XML 媒體類型。H.湯普森;C.莉莉。IETF。2014年7月。擬議標準。網址: https://www.rfc-editor.org/rfc/rfc7303
[rfc7845]
Ogg Encapsulation for the Opus Audio Codec. T. Terriberry; R. Lee; R. Giles. IETF. April 2016. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc7845
Opus 音訊編解碼器的 Ogg 封裝。T.特裡伯里;R·李;R.賈爾斯。IETF。2016年4月。擬議標準。網址: https://www.rfc-editor.org/rfc/rfc7845
[rfc8089]
The "file" URI Scheme. M. Kerwin. IETF. February 2017. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc8089
“檔”URI 方案。M.克溫。IETF。2017 年 2 月。擬議標準。網址: https://www.rfc-editor.org/rfc/rfc8089
[RFC8174]
Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174
RFC 2119 關鍵字中大寫與小寫的歧義。B.萊巴。IETF。2017 年 5 月。當前最佳實踐。網址: https://www.rfc-editor.org/rfc/rfc8174
[smil3] [微笑3]
Synchronized Multimedia Integration Language (SMIL 3.0). Dick Bulterman. W3C. 1 December 2008. W3C Recommendation. URL: https://www.w3.org/TR/SMIL3/
同步多媒體集成語言 (SMIL 3.0)。迪克·布爾特曼。W3C的。2008年12月1日。W3C 建議。網址: https://www.w3.org/TR/SMIL3/
[svg]
SVG. W3C. URL: https://www.w3.org/TR/SVG/
SVG。W3C的。網址: https://www.w3.org/TR/SVG/
[truetype] [真類型]
TrueType™ Reference Manual. Apple, Inc. URL: https://developer.apple.com/fonts/TrueType-Reference-Manual/
TrueType™ 參考手冊。Apple, Inc. 網址: https://developer.apple.com/fonts/TrueType-Reference-Manual/
[uax15]
Unicode Normalization Forms. Ken Whistler. Unicode Consortium. 17 August 2022. Unicode Standard Annex #15. URL: https://www.unicode.org/reports/tr15/tr15-53.html
Unicode 規範化形式。肯·惠斯勒。Unicode 聯盟。2022 年 8 月 17 日。Unicode 標準附件 #15。網址: https://www.unicode.org/reports/tr15/tr15-53.html
[unicode] [Uni代碼]
The Unicode Standard. Unicode Consortium. URL: https://www.unicode.org/versions/latest/
Unicode 標準。Unicode 聯盟。網址: https://www.unicode.org/versions/latest/
[url] [網址]
URL Standard. Anne van Kesteren. WHATWG. Living Standard. URL: https://url.spec.whatwg.org/
URL 預設值。安妮·范·凱斯特倫(Anne van Kesteren)。什麼WG。生活水準。網址: https://url.spec.whatwg.org/
[us-ascii] [美國-ASCII]
"Coded Character Set - 7-bit American Standard Code for Information Interchange", ANSI X3.4, 1986..
“編碼字元集 - 用於信息交換的 7 位美國標準代碼”,ANSI X3.4,1986 年。
[wai-aria] [詠歎調]
Accessible Rich Internet Applications (WAI-ARIA). W3C. URL: https://www.w3.org/TR/wai-aria/
可訪問的富 Internet 應用程式 (WAI-ARIA)。W3C的。網址: https://www.w3.org/TR/wai-aria/
[webp-container] [webp容器]
WebP Container Specification. URL: https://developers.google.com/speed/webp/docs/riff_container
WebP 容器規範。網址: https://developers.google.com/speed/webp/docs/riff_container
[webp-lb] [網络-LB]
WebP Lossless Bitstream Specification. URL: https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification
WebP 無損比特流規範。網址: https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification
[woff] [呜呜]
WOFF File Format 1.0. Jonathan Kew; Tal Leming; Erik van Blokland. W3C. 13 December 2012. W3C Recommendation. URL: https://www.w3.org/TR/WOFF/
WOFF 檔案格式 1.0。喬納森·邱(Jonathan Kew);塔爾·勒明;埃裡克·范·布洛克蘭德(Erik van Blokland)。W3C的。2012年12月13日。W3C 建議。網址: https://www.w3.org/TR/WOFF/
[woff2] [沃夫2]
WOFF File Format 2.0. Vladimir Levantovsky; Raph Levien. W3C. 10 March 2022. W3C Recommendation. URL: https://www.w3.org/TR/WOFF2/
WOFF 檔案格式 2.0。弗拉基米爾·列萬托夫斯基;拉夫·萊威恩(Raph Levien)。W3C的。2022 年 3 月 10 日。W3C 建議。網址: https://www.w3.org/TR/WOFF2/
[xinclude]
XML Inclusions (XInclude) Version 1.0 (Second Edition). Jonathan Marsh; David Orchard; Daniel Veillard. W3C. 15 November 2006. W3C Recommendation. URL: https://www.w3.org/TR/xinclude/
XML 包含 (XInclude) 版本 1.0(第二版)。喬納森·馬什;大衛·奧查德;丹尼爾·韋拉德。W3C的。2006年11月15日。W3C 建議。網址: https://www.w3.org/TR/xinclude/
[xml] [xml格式]
Extensible Markup Language (XML) 1.0 (Fifth Edition). Tim Bray; Jean Paoli; Michael Sperberg-McQueen; Eve Maler; François Yergeau et al. W3C. 26 November 2008. W3C Recommendation. URL: https://www.w3.org/TR/xml/
可擴展標記語言 (XML) 1.0(第五版)。蒂姆·佈雷;讓·保利;邁克爾·斯珀伯格-麥昆;夏娃·馬勒;François Yergeau 等人,W3C。2008年11月26日。W3C 建議。網址: https://www.w3.org/TR/xml/
[xml-names] [xml名稱]
Namespaces in XML 1.0 (Third Edition). Tim Bray; Dave Hollander; Andrew Layman; Richard Tobin; Henry Thompson et al. W3C. 8 December 2009. W3C Recommendation. URL: https://www.w3.org/TR/xml-names/
XML 1.0(第三版)中的命名空間。蒂姆·佈雷;戴夫·霍蘭德;安德魯·萊曼;理查·托賓;亨利·湯普森(Henry Thompson)等人W3C。2009年12月8日。W3C 建議。網址: https://www.w3.org/TR/xml-names/
[xmldsig-core] [xmldsig-核心]
XML Signature Syntax and Processing (Second Edition). Donald Eastlake; Joseph Reagle; David Solo; Frederick Hirsch; Thomas Roessler et al. W3C. 10 June 2008. W3C Recommendation. URL: https://www.w3.org/TR/xmldsig-core/
XML 簽名語法和處理(第二版)。唐納德·伊斯特萊克;約瑟夫·雷格爾;大衛·索羅;弗雷德里克·赫希(Frederick Hirsch);托馬斯·羅斯勒(Thomas Roessler)等人W3C。2008年6月10日。W3C 建議。網址: https://www.w3.org/TR/xmldsig-core/
[xmldsig-core1] [xmldsig-核心1]
XML Signature Syntax and Processing Version 1.1. Donald Eastlake; Joseph Reagle; David Solo; Frederick Hirsch; Magnus Nyström; Thomas Roessler; Kelvin Yiu. W3C. 11 April 2013. W3C Recommendation. URL: https://www.w3.org/TR/xmldsig-core1/
XML 簽名語法和處理版本 1.1。唐納德·伊斯特萊克;約瑟夫·雷格爾;大衛·索羅;弗雷德里克·赫希(Frederick Hirsch);馬格努斯·尼斯特倫;托馬斯·羅斯勒;姚開爾文。W3C的。2013年4月11日。W3C 建議。網址: https://www.w3.org/TR/xmldsig-core1/
[xmlenc-core1] [xmlenc-核心1]
XML Encryption Syntax and Processing Version 1.1. Donald Eastlake; Joseph Reagle; Frederick Hirsch; Thomas Roessler. W3C. 11 April 2013. W3C Recommendation. URL: https://www.w3.org/TR/xmlenc-core1/
XML 加密語法和處理版本 1.1。唐納德·伊斯特萊克;約瑟夫·雷格爾;弗雷德里克·赫希(Frederick Hirsch);托馬斯·羅斯勒。W3C的。2013年4月11日。W3C 建議。網址: https://www.w3.org/TR/xmlenc-core1/
[xmlenc-decrypt] [xmlenc-解密]
Decryption Transform for XML Signature. Merlin Hughes; Takeshi Imamura; Hiroshi Maruyama. W3C. 10 December 2002. W3C Recommendation. URL: https://www.w3.org/TR/xmlenc-decrypt/
XML 簽署的解密轉換。梅林·休斯;今村武;丸山浩。W3C的。2002年12月10日。W3C 建議。網址: https://www.w3.org/TR/xmlenc-decrypt/
[xmlschema-2] [xml架構-2]
XML Schema Part 2: Datatypes Second Edition. Paul V. Biron; Ashok Malhotra. W3C. 28 October 2004. W3C Recommendation. URL: https://www.w3.org/TR/xmlschema-2/
XML 架構第2部分:數據類型第二版。保羅·比隆(Paul V. Biron);阿肖克·瑪律霍特拉(Ashok Malhotra)。W3C的。2004年10月28日。W3C 建議。網址: https://www.w3.org/TR/xmlschema-2/
[zip] [郵編]
.ZIP File Format Specification. 15 July 2020. Final. URL: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
.ZIP 檔案格式規範。2020 年 7 月 15 日。最後。網址: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

M.2 Informative references
M.2 資料參考資料

[audiobooks] [有聲讀物]
Audiobooks. Wendy Reid; Matt Garrish. W3C. 10 November 2020. W3C Recommendation. URL: https://www.w3.org/TR/audiobooks/
有聲讀物。溫迪·裡德;馬特·加里什。W3C的。2020 年 11 月 10 日。W3C 建議。網址: https://www.w3.org/TR/audiobooks/
[css-viewport-1] [css-視口-1]
CSS Viewport Module Level 1. W3C. URL: https://drafts.csswg.org/css-viewport/
CSS 視口模組級別 1。W3C的。網址: https://drafts.csswg.org/css-viewport/
[dpub-aria] [dpub-詠歎調]
Digital Publishing WAI-ARIA Module. W3C. URL: https://www.w3.org/TR/dpub-aria/
數位出版 WAI-ARIA 模組。W3C的。網址: https://www.w3.org/TR/dpub-aria/
[epub-a11y-tech-11] [格式:epub-a11y-tech-11]
EPUB Accessibility Techniques 1.1. Matt Garrish; George Kerscher; Charles LaPierre; Gregorio Pellegrino; Avneesh Singh. W3C. 10 May 2023. W3C Working Group Note. URL: https://www.w3.org/TR/epub-a11y-tech-11/
EPUB 輔助功能技術 1.1.馬特·加里什;喬治·克舍爾;查理斯·拉皮埃爾;格雷戈里奧·佩萊格里諾;阿夫尼什·辛格(Avneesh Singh)。W3C的。2023年5月10日。W3C 工作組說明。網址: https://www.w3.org/TR/epub-a11y-tech-11/
[epub-multi-rend-11]
EPUB 3 Multiple-Rendition Publications 1.1. Matt Garrish. W3C. 10 May 2023. W3C Working Group Note. URL: https://www.w3.org/TR/epub-multi-rend-11/
EPUB 3 多重演繹出版物 1.1.馬特·加里什。W3C的。2023年5月10日。W3C 工作組說明。網址: https://www.w3.org/TR/epub-multi-rend-11/
[epub-overview-33] [epub-概述-33]
EPUB 3 Overview. Matt Garrish; Ivan Herman. W3C. 10 May 2023. W3C Working Group Note. URL: https://www.w3.org/TR/epub-overview-33/
EPUB 3 概述。馬特·加里什;伊萬·赫爾曼。W3C的。2023年5月10日。W3C 工作組說明。網址: https://www.w3.org/TR/epub-overview-33/
[epub-tts-10]
EPUB 3 Text-to-Speech Enhancements 1.0. Matt Garrish. W3C. 10 May 2023. W3C Working Group Note. URL: https://www.w3.org/TR/epub-tts-10/
EPUB 3 文本轉語音增強功能 1.0。馬特·加里什。W3C的。2023年5月10日。W3C 工作組說明。網址: https://www.w3.org/TR/epub-tts-10/
[fetch] [獲取]
Fetch Standard. Anne van Kesteren. WHATWG. Living Standard. URL: https://fetch.spec.whatwg.org/
獲取標準。安妮·范·凱斯特倫(Anne van Kesteren)。什麼WG。生活水準。網址: https://fetch.spec.whatwg.org/
[h264] [H264號]
H.264 : Advanced video coding for generic audiovisual services. 2017-04-13. URL: https://www.itu.int/ITU-T/recommendations/rec.aspx?rec=13189
H.264:通用視聽服務的高級視頻編碼。2017-04-13. 公司主頁: https://www.itu.int/ITU-T/recommendations/rec.aspx?rec=13189
[international-specs] [國際規格]
Internationalization Best Practices for Spec Developers. Richard Ishida; Addison Phillips. W3C. 27 April 2023. W3C Working Group Note. URL: https://www.w3.org/TR/international-specs/
規範開發人員的國際化最佳實踐。理查·石田;艾迪生·菲力浦斯。W3C的。2023年4月27日。W3C 工作組說明。網址: https://www.w3.org/TR/international-specs/
[iso22424] [國際標準化組織22424]
ISO/IEC TS 22424-1:2020 — Digital publishing — EPUB3 preservation. 2020-01. URL: https://www.iso.org/standard/73163.html
ISO/IEC TS 22424-1:2020 — 數位出版 — EPUB3 保存。2020-01. 網址: https://www.iso.org/standard/73163.html
[isoschematron] [等圖譜]
ISO/IEC 19757-3: Rule-based validation — Schematron. 2006-06-01. URL: http://standards.iso.org/ittf/PubliclyAvailableStandards/c040833_ISO_IEC_19757-3_2006(E).zip
ISO/IEC 19757-3:基於規則的驗證 — Schematron。2006-06-01. 網址: http://standards.iso.org/ittf/PubliclyAvailableStandards/c040833_ISO_IEC_19757-3_2006(E).zip
[json-ld11]
JSON-LD 1.1. Gregg Kellogg; Pierre-Antoine Champin; Dave Longley. W3C. 16 July 2020. W3C Recommendation. URL: https://www.w3.org/TR/json-ld11/
JSON-LD 1.1 版本。格雷格·凱洛格;皮埃爾-安托萬·尚平;戴夫·朗利(Dave Longley)。W3C的。2020 年 7 月 16 日。W3C 建議。網址: https://www.w3.org/TR/json-ld11/
[mediaqueries-3] [媒體查詢-3]
Media Queries Level 3. Florian Rivoal. W3C. 5 April 2022. W3C Recommendation. URL: https://www.w3.org/TR/mediaqueries-3/
媒體查詢級別 3。弗洛裡安·里沃爾。W3C的。2022年4月5日。W3C 建議。網址: https://www.w3.org/TR/mediaqueries-3/
[nvdl]
ISO/IEC 19757-4: NVDL (Namespace-based Validation Dispatching Language). 2006-06-01. URL: http://standards.iso.org/ittf/PubliclyAvailableStandards/c038615_ISO_IEC_19757-4_2006(E).zip
ISO/IEC 19757-4:NVDL(基於命名空間的驗證調度語言)。2006-06-01. 網址: http://standards.iso.org/ittf/PubliclyAvailableStandards/c038615_ISO_IEC_19757-4_2006(E).zip
[odf]
Open Document Format for Office Applications (OpenDocument) v1.0. 1 May 2005. URL: https://www.oasis-open.org/committees/download.php/12572/OpenDocument-v1.0-os.pdf
Open Document Format for Office 應用程式 (OpenDocument) v1.0。2005年5月1日。網址: https://www.oasis-open.org/committees/download.php/12572/OpenDocument-v1.0-os.pdf
[relaxng-schema] [鬆弛模式]
Information technology -- Document Schema Definition Language (DSDL) -- Part 2: Regular-grammar-based validation -- RELAX NG. ISO/IEC. 2008. URL: http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip
資訊技術 -- 文件模式定義語言 (DSDL) -- 第 2 部分:基於正規語法的驗證 -- RELAX NG。國際標準化組織/國際電工委員會。2008. 網址: http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip
[rfc3986]
Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986
統一資源標識碼 (URI):通用語法。T.伯納斯-李;R.菲爾丁;L.馬辛特。IETF。2005年1月。標準互聯網。網址: https://www.rfc-editor.org/rfc/rfc3986
[rfc4839]
Media Type Registrations for the Open eBook Publication Structure (OEBPS) Package File (OPF). G. Conboy; J. Rivlin; J. Ferraiolo. IETF. April 2007. Informational. URL: https://www.rfc-editor.org/rfc/rfc4839
開放電子書出版結構 (OEBPS) 包檔 (OPF) 的媒體類型註冊。G.康博伊;J.里夫林;J.費拉伊奧洛。IETF。2007 年 4 月。資訊。網址: https://www.rfc-editor.org/rfc/rfc4839
[rfc6386]
VP8 Data Format and Decoding Guide. J. Bankoski; J. Koleszar; L. Quillio; J. Salonen; P. Wilkins; Y. Xu. IETF. November 2011. Informational. URL: https://www.rfc-editor.org/rfc/rfc6386
VP8 數據格式和解碼指南。J.班科斯基;J.科萊薩爾;L.奎利奧;J.薩洛寧;P.威爾金斯;徐彥.IETF。2011年11月。資訊。網址: https://www.rfc-editor.org/rfc/rfc6386
[uaag20]
User Agent Accessibility Guidelines (UAAG) 2.0. James Allan; Greg Lowney; Kimberly Patch; Jeanne F Spellman. W3C. 15 December 2015. W3C Working Group Note. URL: https://www.w3.org/TR/UAAG20/
使用者代理可訪問性指南 (UAAG) 2.0。詹姆斯·艾倫;格雷格·洛尼;金伯利補丁;珍妮·斯佩爾曼(Jeanne F Spellman)。W3C的。2015年12月15日。W3C 工作組說明。網址: https://www.w3.org/TR/UAAG20/
[uax44]
Unicode Character Database. Ken Whistler. Unicode Consortium. 2 September 2022. Unicode Standard Annex #44. URL: https://www.unicode.org/reports/tr44/tr44-30.html
Unicode 字元資料庫。肯·惠斯勒。Unicode 聯盟。2022 年 9 月 2 日。Unicode 標準附件 #44。 網址: https://www.unicode.org/reports/tr44/tr44-30.html
[wcag2]
Web Content Accessibility Guidelines (WCAG) 2. W3C. URL: https://www.w3.org/TR/WCAG2/
Web 內容可存取性指南 (WCAG) 2.W3C的。網址: https://www.w3.org/TR/WCAG2/
[webvtt] [網络vtt]
WebVTT: The Web Video Text Tracks Format. Silvia Pfeiffer. W3C. 4 April 2019. W3C Candidate Recommendation. URL: https://www.w3.org/TR/webvtt1/
WebVTT:Web 視頻文字軌道格式。西爾維婭·菲佛(Silvia Pfeiffer)。W3C的。2019 年 4 月 4 日。W3C 候選推薦。網址: https://www.w3.org/TR/webvtt1/
[xhr]
XMLHttpRequest Standard. Anne van Kesteren. WHATWG. Living Standard. URL: https://xhr.spec.whatwg.org/
XMLHttpRequest 標準。安妮·范·凱斯特倫(Anne van Kesteren)。什麼WG。生活水準。網址: https://xhr.spec.whatwg.org/
[xmlbase] [XML庫]
XML Base (Second Edition). Jonathan Marsh; Richard Tobin. W3C. 28 January 2009. W3C Recommendation. URL: https://www.w3.org/TR/xmlbase/
XML 庫(第二版)。喬納森·馬什;理查·托賓。W3C的。2009年1月28日。W3C 建議。網址: https://www.w3.org/TR/xmlbase/
[xmlsec-rngschema-20130411]
XML Security RELAX NG Schemas. Murata Makoto; Frederick Hirsch. W3C. 11 April 2013. W3C Working Group Note. URL: https://www.w3.org/TR/2013/NOTE-xmlsec-rngschema-20130411/
XML 安全性 RELAX NG 模式。村田誠;弗雷德里克·赫希(Frederick Hirsch)。W3C的。2013年4月11日。W3C 工作組說明。網址: https://www.w3.org/TR/2013/NOTE-xmlsec-rngschema-20130411/