Working Group Draft 15 February 2011
Copyright © 2010, 2011 International Digital Publishing Forum™
All rights reserved. This work is protected under Title 17 of the United States Code. Reproduction and dissemination of this work with changes is prohibited except with the written permission of the International Digital Publishing Forum (IDPF).
EPUB is a registered trademark of the International Digital Publishing Forum.
Table of Contents
package
Element
metadata
Element
identifier
Element
title
Element
language
Element
meta
Element
link
Element
manifest
Element
item
Element
spine
Element
itemref
Element
guide
Element [DEPRECATED]
bindings
Element
mediaType
Element
This specification, EPUB Publications 3.0, defines publication-level semantics and conformance requirements for EPUB® 3.
This specification is one of a family of related specifications that compose EPUB 3, the third major revision of an interchange and delivery format for digital publications based on XML and Web Standards. It is meant to be read and understood in concert with the other specifications that make up EPUB 3:
The EPUB 3 Overview [EPUB3Overview], which should be read first, provides an informative overview of EPUB and a roadmap to the rest of the EPUB 3 documents.
EPUB Content Documents 3.0 [ContentDocs30], which defines profiles of XHTML, SVG and CSS for use in the context of EPUB Publications.
EPUB Open Container Format (OCF) 3.0 [OCF3], which defines a file format and processing model for encapsulating a set of related resources into a single-file (ZIP) EPUB Container.
EPUB Media Overlays 3.0 [MediaOverlays30], which defines a format and a processing model for synchronization of text and audio.
This specification supersedes Open Package Format 2.0.1 [OPF2]. Refer to [EPUB3Changes] for information on differences between this specification and its predecessor.
A logical document entity consisting of a set of interrelated resources and packaged in a EPUB Container, as defined by this specification and its sibling specifications .
A resource that contains content or instructions that contribute, directly or indirectly, to the logic and rendering of the EPUB Publication (e.g., the Package Document, EPUB Content Documents, EPUB Style Sheets, audio, video, images, embedded fonts, scripts). In the absence of this resource, the Publication cannot be rendered as intended by the Author.
Publication resources are listed in the manifest .
A Publication Resource that is not a Core Media Type, so requires at least one fallback as defined in Fallback Requirements and Processing Flow .
A Publication Resource that is a Core Media Type and may therefore be included in the EPUB Publication without the provision of fallbacks .
A resource that is referenced from within an EPUB Publication, but is not a Publication Resource.
Supplementary Resources are not listed in the manifest .
A Publication Resource that conforms to one of the EPUB Content Document definitions (XHTML or SVG).
An EPUB Content Document is a Core Media Type, and may therefore be included in the EPUB Publication without the provision of fallbacks .
An EPUB Content Document conforming to the profile of [HTML5] defined in XHTML Content Documents [ContentDocs30] .
XHTML Content Documents use the XHTML syntax of [HTML5].
An EPUB Content Document conforming to the constraints expressed in SVG Content Documents [ContentDocs30] .
A specialization of the XHTML Content Document, containing human- and machine readable global navigation information, conforming to the constraints expressed in EPUB Navigation Documents [ContentDocs30] .
An EPUB Content Document that includes scripting, or an XHTML Content Document that contains HTML5 forms elements.
Refer to Scripted Content Documents [ContentDocs30] for more information.
An EPUB Content Document referenced from the spine
A set of Publication Resource types for which no fallback is required. Refer to Core Media Types for more information.
A Publication Resource carrying bibliographical and structural metadata about the EPUB Publication, as defined in Package Documents .
The digital (or physical) embodiment of a work of intellectual content. Changes to the content such as significant revision, abridgement, translation, or the realization of the content in a different digital or physical form result in a new manifestation. There may be many individual but identical copies of a manifestation, termed 'instances' or 'items'. The ISBN is an example of a manifestation identifier, and is shared by all instances of that manifestation.
All instances of a manifestation need not be bit-for-bit identical, as minor corrections or revisions are not judged to create a new manifestation or work.
The Unique Identifier is the primary identifier for an EPUB Publication, as identified by the attribute . The Unique Identifier may be shared by one or many Manifestations of the same work that conform to the EPUB standard and embody the same content, where the differences between the Manifestations are limited to those changes that take account of differences between EPUB Reading Systems (and which themselves may require changes in the ISBN).
The Unique Identifier is less granular than the ISBN. However, significant revision, abridgement, etc. of the content requires a new Unique Identifier.
The Package Identifier allows any instance of an EPUB Publication to be compared against another to determine if they are identical, different versions of the same Manifestation, or unrelated.
Refer to Package Identifier for more information.
A list of all Publication Resources that constitute the EPUB Publication.
Refer to manifest for more information.
An ordered list of Publication Resources, typically EPUB Content Documents, representing the default reading order of the publication.
Refer to spine for more information.
TODO.
An XML document that associates the text content of an XHTML Content Document with pre-recorded audio narration in order to provide a synchronized playback experience, as defined in [MediaOverlays30].
The rendering of the textual content of an EPUB Publication as artificial human speech using a synthesized voice.
A CSS Style Sheet conforming to the CSS profile defined in EPUB Style Sheets [ContentDocs30] .
The region of an EPUB Reading System in which the content of an EPUB Publication is rendered visually to a User.
A Viewport capable of displaying CSS-styled content.
A ZIP-based packaging and distribution format for an EPUB Publication, as defined in [OCF3].
The person(s) or organization responsible for the creation of an EPUB Publication, which may or may not be the creator of the content and resources it contains.
An individual that consumes an EPUB Publication using an EPUB Reading System.
A system that processes EPUB Publications for presentation to Users in a manner conformant with this specification and its sibling specifications .
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
All sections of this specification are normative except where identified by the informative status label "This section is informative". The application of informative status to sections and appendices applies to all child content and subsections they may contain.
All examples in this specification are informative.
This section is informative
EPUB is an interchange and delivery format for digital publications based on XML and Web Standards. An EPUB Publication can be thought of as a packaging of Web content that represents a digital book, magazine, or other type of publication, with a declarative means to navigate through the content, and the ability to be distributed reliably for online and offline consumption.
This specification defines the semantics and conformance requirements for EPUB at the publication level. It defines the format of the Package Document, as well as rules for how this document and other Publication Resources are associated to create a conforming EPUB Publication. This specification also defines conformance criteria for EPUB Reading Systems.
This section defines conformance requirements for EPUB Publications and EPUB Reading Systems at the Publication level. Conformance requirements particular to specific Publication Resources and processing contexts are located in the specifications referenced herein.
An EPUB Publication must meet all of the following criteria:
› It must contain exactly one Package Document, conformant to the content requirements defined in Package Document Content Conformance.
› All Publication Resources must be represented in the Package Document as defined in manifest and located physically as defined in Publication Resource Locations.
› It must contain at least one EPUB Content Document conformant to the content requirements defined in EPUB Content Documents [ContentDocs30] .
› It may contain zero or more EPUB Style Sheets conformant to the content requirements defined in EPUB Style Sheet Content Conformance [ContentDocs30] .
› It may contain zero or more Media Overlay Documents conformant to the content requirements defined in [MediaOverlays30].
› It may contain zero or more additional Publication Resources, all of which must be represented in the Package Document manifest as defined in manifest.
› It must be packaged in a EPUB Container as defined in [OCF3].
An EPUB Reading System must meet all of the following criteria:
› It must process the EPUB Container as defined in [OCF3].
› It must process the Package Document as defined in Package Document Reading System Conformance, and honor the presentation logic expressed through the Package Document.
› Unless specified as conditional behavior in this section, it must support rendering of all Core Media Type Resources.
› It may support an arbitrary set of Foreign Resource types, and must process fallbacks for Foreign Resources as defined in Fallback Requirements and Processing Flow if not.
› It must process XHTML Content Documents as defined in XHTML Content Documents Reading System Conformance [ContentDocs30] .
› It must process SVG Content Documents as defined in SVG Reading System Conformance [ContentDocs30] .
› If it has a CSS Viewport , it must support visual rendering of XHTML Content Documents as defined in EPUB Style Sheet Reading System Conformance [ContentDocs30] .
› If it has the capability to render raster images, it must support the raster image Core Media Types.
› If it has the capability to render vector images, it must support the vector image Core Media Types.
› If it has the capability to render video, it must support the video Core Media Types.
› If it has the capability to render pre-recorded audio, it must support the audio Core Media Types, and should support Media Overlays [MediaOverlays30].
› If it supports Text-to-Speech (TTS) rendering, it should support PLS Documents [ContentDocs30] , the CSS3 Speech features of the EPUB CSS Profile [ContentDocs30] and the SSML attributes [ContentDocs30] of XHTML Content Documents.
› It should process EPUB version 2
publications as defined by [OPF2], [OPS2] and [OCF2], and must at a
minimum attempt to process any publication whose Package Document
version
attribute designates a version lower than
3.0
or which omits the version
attribute.
› It should attempt to process EPUB
publications whose Package Document version
attribute
designates a version higher than 3.0
or which omits
the version
attribute.
› It must be a conformant non-validating processor [XML].
› It must be a conformant processor as defined in [XMLNS].
› It must support
xml-stylesheet
processing instructions [ASSOCSS], and may support additional processing
instructions.
› It must be a conformant application as defined by [XML Base].
A conforming Reading System is not necessarily a single dedicated program or device, but may exist as a distributed system.
This section is informative
The Package Document carries bibliographic and structural metadata about an EPUB Publication, and is thus the primary source of information about how to process and display it.
The Package Document is an XML document consisting of a set of container elements, each dedicated to housing information about a particular aspect of the Publication. These containers effectively centralize metadata for the Publication, detail the individual resources that compose it and provide reading order and other information for rendering the Publication to a User.
The following list summarizes the information a Package Document contains:
Publication metadata — mechanisms for including and/or referencing metadata applicable to the entire Publication and particular resources within it.
A Publication manifest — identifies (via IRI) and describes (via MIME type) the set of resources that collectively compose the Publication.
A spine — an ordered sequence of ID references to top-level resources in the manifest from which all other resources in the set can be reached or utilized. The spine defines the default reading order of the publication.
Fallback chains — an optional means for Publications to define an ordered list of items that can be considered content equivalents that a Reading System can choose between for rendering.
Bindings — an optional means of associating script-based implementations with custom media types.
A Package Document must meet all of the following criteria:
› It must meet the conformance constraints for XML documents defined in XML Document Content Conformance .
› It must be valid to the Package Document schema as defined in Appendix A, Package Document Schema and conform to all content conformance constraints expressed in Package Document Definition.
› The Package Document filename
should use the file extension .opf
.
Package Documents have the MIME media type
application/oebps-package+xml
[RFC4839].
An EPUB Reading System must meet all of the following criteria:
› It must process the Package Document in conformance with all Reading System conformance constraints expressed in Package Document Definition.
All elements [XML] defined in this section are in the
http://www.idpf.org/2007/opf
namespace [XMLNS] unless otherwise specified.
package
ElementThe package
element is the root container of the Package Document, encapsulating metadata and resource
information for the EPUB Publication.
package
The package
element is the root element of the
Package Document.
version
[required]
Specifies the EPUB specification version to which the publication conforms.
This version of the specification requires the
attribute have the value 3.0
.
unique-identifier
[required]
An IDREF [XML] that identifies the
dc:identifier
element
that provides the package's preferred, or primary,
identifier.
Refer to Publication Identifiers for more information.
profile
[required]
Specifies the URI of the metadata profile [RDFa11 Core] for the Package Document.
This version of the specification requires the
attribute have the value
http://www.idpf.org/epub/30/profile/package/
[PackageProfile].
Refer to metadata for more information.
prefix
[optional]
Declares additional metadata vocabulary prefixes not defined in the metadata profile [RDFa11 Core].
Refer to metadata for more information.
xml:lang
[required]
Specifies the language used in the contents and attribute values of the carrying element and its descendants, as defined in section 2.12 Language Identification of [XML].
dir
[optional]
Specifies the base text direction of the content and attribute values of the carrying element and its descendants.
Inherent directionality specified using [Unicode] takes precedence over this attribute.
Allowed values are ltr
(left-to-right) or rtl
(right-to-left).
id
[optional]
The ID [XML] of this element, which must be unique within the document scope.
In this order:
metadata
[required]
,
manifest
[required]
,
spine
[required]
,
guide
[optional/deprecated]
,
bindings
[optional]
NOTE The spec [RDFa11 Core] underlying
the profile
and prefix
attributes is still
evolving. The exact mechanism for vocabulary association in EPUB 3 is
therefore subject to change.
metadata
ElementThe metadata
element encapsulates information about the
publication as a whole, including metadata that applies to the publication
package and to the abstract content contained within the package.
metadata
Required first child of
package
.
The metadata
element has no attributes defined
in this specification.
In any order:
dc:identifier
[1 or more]
,
dc:title
[1 or more]
,
dc:language
[exactly 1]
,
meta
[1 or more]
,
link
[0 or more]
Core Publication metadata is expressed by a combination of three required elements from
the Dublin Core Metadata Element Set [DCMES] —
title
,
identifier
and
language
—
together with optional properties from DCMI Metadata Terms [DCTERMS] and a set of package and ancillary properties defined
in this specification. (Refer to the example at the end of this section for an instance of a complete
minimal metadata set.)
Properties from other vocabularies may be added to the
metadata
section to enhance package and content metadata,
and to supplement required and optional properties, but their use is optional.
This specification subsets the RDFa 1.1 [RDFa11 Core] profile and prefix definition mechanisms to enable the inclusion and extension of metadata vocabularies for defining publications. These features allow core metadata properties to be added unprefixed, and additionally work to standardize the inclusion of metadata across the publishing spectrum by predefining prefixes for the most commonly-used vocabularies.
All publications must reference the metadata profile on the root
package
element using the
profile
attribute.
Unlike its RDFa equivalent, the profile
attribute must only
contain the single canonical URI of the EPUB default profile.
The addition of the metadata profile allows all properties from the EPUB 3 Package Metadata Vocabulary to be referenced without using prefixes. The profile also defines a set of prefixes for adding other vocabulary properties to EPUB Publications. (Refer to the profile for more information.)
If the metadata profile does not define a prefix for a needed vocabulary, it
does not imply that the vocabulary cannot be used. The prefix attribute can also be
attached to the package
element to define additional prefixes. New
prefixes are defined by including whitespace-separated prefix/URI pairings.
The following example shows how to define a new prefix for a vocabulary.
<package … prefix="foaf: http://xmlns.com/foaf/spec/"> <metadata> <meta property="dcterms:creator" id="auth">Samuel Johnson</meta> <meta property="foaf:title" about="#auth">Dr.</meta> … </metadata> </package>
The prefix
attribute must not redeclare a prefix that has already been defined through the metadata profile. Similarly, the XML
Namespaces [XMLNS] method of defining namespace prefixes using the
xmlns
pseudo-attribute must not be used to define vocabulary
prefixes.
Example
The following example represents the minimal set of metadata that all Publications must contain.
<package … unique-identifier="pub-id"> … <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:identifier id="pub-id">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</dc:identifier> <dc:title id="title">Norwegian Wood</dc:title> <dc:language>en</dc:language> <meta property="dcterms:modified">2011-01-01T12:00:00Z</meta> </metadata> … </package>
identifier
ElementThe [DCMES]
identifier
element contains a
single identifier associated with the EPUB Publication,
such as a UUID, DOI, ISBN or ISSN.
dc:identifier
http://purl.org/dc/elements/1.1/
Required child of metadata. Repeatable.
id
[required]
The ID [XML] of this element, which must be unique within the document scope.
prefer
[optional]
An IDREF [XML] that identifies the meta
element containing the
equivalent [DCTERMS] property. Reading Systems should use the referenced property in
preference to the current element when processing the metadata for an EPUB Publication.
Text
Every metadata
section must include at least one
identifier
element containing an unambiguous identifier
for the publication. Multiple identifier
elements are
permitted, but only one can be marked as the Unique Identifier via the
package
element
unique-identifier
attribute.
The following example shows the unique identifier
element for a Publication.
<package … unique-identifier="pub-id"> <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:identifier id="pub-id">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</dc:identifier> … </metadata> </package>
Reading Systems must not fail catastrophically if they encounter two distinct EPUB Publications with the same purportedly Unique Identifier.
This specification makes a distinction between the Unique Identifier for an EPUB Publication and the identifier that uniquely identifies a specific version of it (i.e., to be able to differentiate EPUB Publications containing different versions of the same Manifestation). Two copies of an ePub that are bit-for-bit identical are the same version and must retain the same last modified date. If they are not bit-for-bit identical, they represent different versions, and must have different last modified dates.
To identify a specific version of a packaged Publication, a Package Identifier can be constructed by combining the Unique Identifier with the last modified date of the Publication. Changes between versions may include minor typographic or markup corrections, without affecting the Unique Identifier. Significant revisions to the content that result in a new edition require a change of the Unique Identifier. For more information on the semantics and requirements of the Package Identifier, refer to Package Identifier.
The [DCTERMS]
identifier
property will supersede the DCMES identifier
element in a future
version of the specification, but its inclusion is currently optional. Authors
should include both versions for forwards compatibility, using the
prefer
attribute on the identifier
element to indicate to Reading Systems that the property should be used in
preference. Refer to Dublin Core Metadata Vocabulary Transition for
more information.
The following example shows how an identifier
element
and property should co-exist within a publication.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:identifier id="pub-id" prefer="uuid">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</dc:identifier> <meta property="dcterms:identifier" id="uuid">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</meta> … </metadata>
This specification imposes no additional restrictions or requirements on identifiers except that they must be at least one character in length. It is strongly recommended, however, that all identifiers be fully qualified URIs.
If the identifier
([DCMES] or [DCTERMS]) conforms to a established system or has been granted
by an issuing authority, the scheme employed should be identified by attaching
the optional
scheme
ancillary property to the identifier
.
The following example shows how an identifier
can be
marked as a DOI.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:identifier id="pub-id">urn:doi:10.1016/j.iheduc.2008.03.001</dc:identifier> <meta about="#pub-id" property="scheme">doi</meta> … </metadata>
This specification does not require or endorse the use of any scheme for identifiers, but authors are encouraged to use established identifiers for schemes such as provided by the ONIX and MARC standards. The scheme identifier used should conform to the requirements of the chosen system; this specification imposes no additional restrictions or requirements on scheme identifiers.
When a Publication is derived from another publication, the identifier for
that source publication may be included in the Publication metadata, and
must be represented using the
source-identifier
property if
included.
title
ElementThe [DCMES]
title
element represents an instance of
a name given to the EPUB Publication.
dc:title
http://purl.org/dc/elements/1.1/
Required child of metadata. Repeatable.
id
[optional]
The ID [XML] of this element, which must be unique within the document scope.
prefer
[optional]
An IDREF [XML] that identifies the meta
element containing the
equivalent [DCTERMS] property. Reading Systems should use the referenced property in
preference to the current element when processing the metadata for an EPUB Publication.
Text
Every metadata
section must include at least one
title
element containing the title for the Publication.
Multiple title
elements are permitted, but the optional
display-seq
property should be attached to each to
indicate their primacy for display and other rendering purposes. If no means of
establishing the primary title of the publication is included, Reading Systems
must treat the first title
element in document order as the primary
title.
The following example shows how to indicate the display order for multiple
title
elements.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> … <dc:title prefer="t1" id="ot1" xml:lang="fr">Mon premier guide de cuisson, un Mémoire</dc:title> <meta about="#t1" property="display-seq">2</meta> <dc:title prefer="t2" id="ot2">The Great Cookbooks of the World</dc:title> <meta about="#t2" property="display-seq">1</meta> … </metadata>
The [DCTERMS]
title
property will supersede the DCMES
title
element in a future version of the specification, but
its inclusion is currently optional. Authors should include both versions for
forwards compatibility, using the prefer
attribute on the
title
element to indicate to Reading Systems that the
property should be used in preference. Refer to Dublin Core Metadata Vocabulary Transition for more
information.
The following example shows how a title
element and
property should co-exist within a publication.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> … <dc:title id="title" prefer="dcterms-title">Norwegian Wood</dc:title> <meta property="dcterms:title" id="dcterms-title">Norwegian Wood</meta> … </metadata>
This specification imposes no additional restrictions or requirements on titles except that they must be at least one character in length.
language
ElementThe [DCMES]
language
element specifies the default language of the
Publication content.
dc:language
http://purl.org/dc/elements/1.1/
Required child of metadata.
prefer
[optional]
An IDREF [XML] that identifies the meta
element containing the
equivalent [DCTERMS] property. Reading Systems should use the referenced property in
preference to the current element when processing the metadata for an EPUB Publication.
Text
Every metadata
section must include a single
language
element with a value conforming to [RFC5646].
The following example shows a publication in U.S. English.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> … <dc:language>en-US</dc:language> … </metadata>
A single optional [DCTERMS]
language
property may also be included. The value of this
property must also conform to RFC 5646. When both the DCMES element and DCTERMS
property are included, they must both have the same language code as their
value.
Issue 77.
The DCTERMS
language
property will supersede the DCMES
language
element in a future version of the specification,
but its inclusion is currently optional. Authors should include both versions
for forwards compatibility, using the prefer
attribute on the
language
element to indicate to Reading Systems that the
property should be used in preference. Refer to Dublin Core Metadata Vocabulary Transition for more
information.
The following example shows how a language
element and
property should co-exist within a publication.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> … <dc:language prefer="pub-lang">en-US</dc:language> <meta property="dcterms:language" id="pub-lang">en-US</meta> … </metadata>
meta
ElementThe meta
element provides a generic means of including
package metadata, allowing the expression of primary metadata about the package
or content and refinement of that metadata.
meta
As child of the metadata element. Repeatable.
property
[required]
A CURIE [RDFa11 Core] that resolves
to a term in one of the vocabularies defined in the
metadata profile or package
element
prefix
attribute.
Refer to Metadata meta
properties
for a set of properties defined by this
specification.
about
[context dependent]
Identifies the subject of the property being expressed. The value of the attribute must be a relative IRI [RFC3987] pointing to the resource or element it describes.
The about
attribute is optional
depending on the type of metadata being expressed. When
omitted, the property relates to the EPUB Publication as
a whole.
id
[optional]
The ID [XML] of this element, which must be unique within the document scope.
Text
Each meta
element defines a metadata expression consisting of a
subject, predicate and object. The subject can be the EPUB Publication (e.g., to express its title(s),
identifier(s), etc.), a resource belonging to the Publication (e.g., to express
the duration of a media clip) or a metadata expression defined in another
meta
element (e.g., to identify a scheme an identifier conforms
to).
The subject of the metadata expression is defined by the about
attribute. When attached to a meta
element, the attribute must
reference the specific metadata element or resource that constitutes the
subject. In its absence, the metadata expression defines metadata about the
Publication.
The predicate of the metadata expression — the relationship between the
subject and object — is defined by the required property
attribute. The value of the property
must be a CURIE [RDFa11 Core] that resolves to a property from a metadata
vocabulary (it is not required that Reading System be able to resolve the
CURIEs, however).
NOTE The spec [RDFa11 Core] underlying
the profile
and prefix
attributes is still
evolving. The exact mechanism for vocabulary association in EPUB 3 is
therefore subject to change.
The following example shows an identifier being declared for the
Publication in the first meta
element and a scheme being
defined for the identifier in the second.
<metadata> <meta property="dcterms:identifier" id="pub-id">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</meta> <meta about="#pub-id" property="scheme">uuid</meta> … </metadata>
The value of the meta
element represents the object of the
metadata expression. Every meta
element must express a value that
is at least one character in length after whitespace normalization.
Note that unless an individual property explicitly specifies a different
whitespace normalization algorithm, Reading Systems must trim all leading and
trailing whitespace from the meta
element values as defined
by the XML specification [XML] before further processing
them.
In order to ensure that a Package Identifier can
be constructed, exactly one [DCTERMS]
modified
property must be included in the metadata
section for the Publication
using the meta
element, as defined in
Package Identifier. Additional modified
properties may be included, but they must have a different subject (i.e., they
must include an about
attribute pointing to an element or resource).
Examples
The following example shows metadata expressed using
meta
elements (the DCMES elements have been omitted for clarity).
<metadata> … <meta property="dcterms:identifier" id="dcterms-id">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</meta> <meta about="#pub-id" property="scheme">uuid</meta> <meta property="dcterms:identifier" id="isbn-id">urn:isbn:9780101010101</meta> <meta about="#isbn-id" property="scheme">isbn</meta> <meta property="source-identifier" id="src-id">urn:isbn:9780375704024</meta> <meta about="#src-id" property="scheme">isbn</meta> <meta property="dcterms:title" id="title">Norwegian Wood</meta> <meta about="#title" property="alternate-script" xml:lang="ja">ノルウェイの森</meta> <meta about="#title" property="title-type">primary</meta> <meta property="dcterms:modified">2011-01-01T12:00:00Z</meta> <meta property="dcterms:language">en</meta> <meta property="page-progression-direction">ltr</meta> <meta property="dcterms:creator" id="creator">Haruki Murakami</meta> <meta about="#creator" property="alternate-script" xml:lang="ja">村上 春樹</meta> <meta about="#creator" property="file-as">Murakami, Haruki</meta> <meta about="#creator" property="role">aut</meta> </metadata>
The following example shows how the complex title "The Great Cookbooks of the World: Mon premier guide de cuisson, un Mémoire. The New French Cuisine Masters, Volume Two. Special Anniversary Edition" could be classified.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title prefer="t1" id="ot1" xml:lang="fr">Mon premier guide de cuisson, un Mémoire</dc:title> <meta property="dcterms:title" id="t1" xml:lang="fr">Mon premier guide de cuisson, un Mémoire</meta> <meta about="#ot1" property="title-type">primary</meta> <meta about="#ot1" property="display-seq">2</meta> <dc:title prefer="t2" id="ot2">The Great Cookbooks of the World</dc:title> <meta property="dcterms:title" id="t2">The Great Cookbooks of the World</meta> <meta about="#ot2" property="title-type">collection</meta> <meta about="#ot2" property="display-seq">1</meta> <meta about="#ot2" property="file-as">Great Cookbooks of the World, The</meta> <dc:title prefer="t3" id="ot3">The New French Cuisine Masters, Volume Two</dc:title> <meta property="dcterms:title" id="t3">The New French Cuisine Masters, Volume Two</meta> <meta about="#ot3" property="title-type">series</meta> <meta about="#ot3" property="file-as">New French Cuisine Masters, The</meta> <meta about="#ot3" property="group-position">2</meta> <meta about="#ot3" property="display-seq">3</meta> <dc:title prefer="t4" id="ot4">Special Anniversary Edition</dc:title> <meta property="dcterms:title" id="t4">Special Anniversary Edition</meta> <meta about="#ot4" property="title-type">edition</meta> <meta about="#ot4" property="display-seq">4</meta> </metadata>
The following example shows an identifier that has been issued by a metadata authority.
<package version="3.0" unique-identifier="pub-id" xmlns="http://www.idpf.org/2007/opf"> <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:identifier id="pub-id">urn:uuid:1234-5678</dc:identifier> <meta property="dcterms:identifier" id="isbn-id">urn:isbn:9780101010101</meta> <meta about="#isbn-id" property="scheme">isbn</meta> <meta about="isbn-id" property="meta-auth" id="meta-authority-01">Metadata Authority Inc.</meta> <link about="#meta-authority-01" rel="xml-signature" href="../META-INF/Signatures.xml#MAI-Signature"/> … </metadata> </package> <!-- in Signatures.xml --> <signatures> <Signature Id="MAI-Signature" xmlns="http://www.w3.org/2000/09/xmldsig#"> … </Signature> </signatures>
link
ElementThe link
element is used to associate supplementary resources
with the publication, such as metadata records.
link
As a child of metadata. Repeatable.
href
[required]
An IRI [RFC3987] to an external metadata resource.
rel
[required]
A space-separated list of CURIEs [RDFa11 Core] that each resolve to a term
in one of the vocabularies defined in the
metadata profile or package
element prefix attribute.
id
[optional]
The ID [XML] of this element, which must be unique within the document scope.
about
[optional]
Identifies the subject of the property being expressed. The value of the attribute must be a relative IRI [RFC3987] pointing to the resource or element it describes.
When the about
attribute is omitted, the
resource applies to the EPUB Publication as a
whole.
Empty
The metadata
element may contain zero or more
link
elements.
The href
attribute of the link
element identifies
the location of the resource and the rel
attribute defines the
nature of the resource (i.e., its relation to the Publication or property
specified in the about
attribute). Refer to Metadata link
properties for the list of resource types that are
recognized by this specification.
Resources identified by the link
element href
attribute are considered Supplementary Resources, and
therefore must not be represented as items
in the manifest. Reading Systems are not
required to dereference the resources identified through the
link
element.
When the link
element references a metadata record, precedence
must be given to metadata defined inline in the Package Document
metadata
element in the case of conflicts.
The optional about
attribute can be attached when the referenced
resource applies to another metadata item (e.g., to tie an XML Signature [XML DSIG Core] to a metadata authority). The resource applies to
the Publication as a whole when the attribute is not present.
Examples
The following example shows the link
element used to
associate three supplementary metadata resources with the publication: an
ONIX record, an XMP record, and a link to an informational web page. Note
that as the foaf:homepage
token is not defined by this specification;
the metadata extensibility
mechanism is employed to associate the vocabulary.
<package … prefix="foaf: http://xmlns.com/foaf/spec/"> <metadata> … <link rel="onix-record" href="http://example.org/onix/12389347"/> <link rel="xmp-record" href="http://example.org/xmp/12389347"/> <link rel="foaf:homepage" href="http://example.org/book-info/12389347" /> … </metadata> … </package>
manifest
ElementThe manifest
element provides an exhaustive list of the Publication Resources that constitute the
EPUB Publication, each represented by an item
element.
This specification supports internationalized resource naming, so elements and attributes that reference Publication Resources accept IRIs as their value. For compatibility with older Reading Systems that only accepts URIs, resource names should be restricted to the ASCII character set.
item
ElementThe item
element represents a Publication Resource.
item
As a child of manifest. Repeatable.
id
[required]
The ID [XML] of this element, which must be unique within the document scope.
href
[required]
An IRI [RFC3987] specifying the
location of the Publication Resource described by this
item
.
media-type
[required]
A MIME string [RFC2046] specifying
the media type of the Publication Resource described by
this item
.
fallback
[conditionally required]
An IDREF [XML] that identifies the fallback for a non-Core Media Type.
Refer to Fallback Requirements and Processing Flow for more information.
properties
[optional]
A space-separated list of CURIEs [RDFa11 Core] that each resolve to a term
in one of the vocabularies defined in the
metadata profile or package
element prefix attribute.
Refer to Manifest item
properties
for a set of properties defined by this
specification.
media-overlay
[optional]
An IDREF [XML] that identifies the
Media Overlay Document for
the resource described by this item
.
Refer to Packaging Media Overlays [MediaOverlays30] for more information.
Empty
Each item
element in the manifest
identifies a Publication Resource by the IRI provided in
its href
attribute. The IRI may be absolute or relative. In the
case of relative IRIs, Reading Systems must use the IRI of the Package Document
as the base when resolving these to absolute IRIs. The resulting absolute IRI
must be unique within the manifest
scope.
All Publication Resources must be referenced from the manifest
regardless of their physical location (i.e., regardless of whether they are
available in the EPUB Container or remotely). Refer to Publication Resource Locations for media type-specific requirements
regarding resource locations.
The Publication Resource identified by an item
element must
conform to the applicable specification(s) as inferred from the MIME Type
provided in the item
element media-type
attribute.
Core Media Type Resources must use the MIME Type
string designated in EPUB Core Media Types.
All Foreign Resources must provide a fallback as defined in Fallback Requirements and Processing Flow .
All Publication Resources must declare any applicable descriptive metadata
properties as defined in Manifest item
properties via the
item
element properties attribute. Exactly one must be
declared as the EPUB Navigation Document using the
nav
property.
The manifest is not self-referencing: it must not include item
elements referring to the resource(s) that make up the Package Document
itself.
The order of item
elements in the manifest is not
significant. The presentation sequence of content documents is provided in
the spine.
This specification and its sibling specifications may explicitly define certain resource types to be supplementary. These resources are not Publication Resources and must not be referenced from the manifest. An example of a supplementary resource is a metadata record referenced from the link element.
Examples
The following example shows a manifest
that only
contains Core Media Type Resources.
<manifest> <item id="intro" href="intro.xhtml" properties="nav" media-type="application/xhtml+xml"/> <item id="c1" href="chap1.xhtml" media-type="application/xhtml+xml"/> <item id="c1-answerkey" href="chap1-answerkey.xhtml" media-type="application/xhtml+xml"/> <item id="c2" href="chap2.xhtml" media-type="application/xhtml+xml"/> <item id="c2-answerkey" href="chap2-answerkey.xhtml" media-type="application/xhtml+xml"/> <item id="c3" href="chap3.xhtml" media-type="application/xhtml+xml"/> <item id="c3-answerkey" href="chap3-answerkey.xhtml" media-type="application/xhtml+xml"/> <item id="notes" href="notes.xhtml" media-type="application/xhtml+xml"/> <item id="cover" href="./images/cover.svg" properties="cover-image" media-type="image/svg+xml"/> <item id="f1" href="./images/fig1.jpg" media-type="image/jpeg"/> <item id="f2" href="./images/fig2.jpg" media-type="image/jpeg"/> <item id="css" href="./style/book.css" media-type="text/css"/> <item id="pls" href="./speech/dict.pls" media-type="application/pls+xml"/> </manifest>
The following example shows a manifest
that references two
Foreign Resources, and therefore
uses the fallback
chain mechanism to supply content alternatives. The fallback
chain terminates with a Core Media Type.
<manifest> <item id="item1" href="chap1_docbook.xml" media-type="application/docbook+xml" fallback="fall1"/> <item id="fall1" href="chap1.pdf" media-type="application/pdf" fallback="fall2" /> <item id="fall2" href="chap1.xhtml" media-type="application/xhtml+xml"/> … </manifest>
Refer also to the Manifest item properties examples for use of
the properties
attribute.
spine
ElementThe spine
element defines the default reading order of the EPUB Publication content by defining an ordered list of
manifest item
references.
spine
id
[optional]
The ID [XML] of this element, which must be unique within the document scope.
toc
[optional]
An IDREF [XML] that identifies the
manifest item that
represents the superseded NCX
.
Refer to NCX Superseded for more information.
Multiple
itemref
elements
[required]
NCX Superseded
The NCX feature defined in [OPF2] is superseded by the EPUB Navigation Document [ContentDocs30] . EPUB 3 Publications may include an NCX (as defined in OPF 2.0.1) for EPUB 2 Reading System forwards compatibility purposes. EPUB 3 Reading Systems must ignore the NCX in favor of the EPUB Navigation Document.
itemref
ElementThe child itemref
elements of the spine
represent a
sequential list of Publication Resources
(typically EPUB Content Documents). The order of the
itemref
elements defines the default reading order of the
Publication.
An EPUB Content Document referenced from the spine
is referred to
in this specification and its sibling
specifications as a top-level Content Document.
itemref
As a child of spine. Repeatable.
idref
[required]
linear
[optional]
Specifies whether the referenced content is primary.
The value of the attribute must be
yes
or no
. The
default value yes
.
Issue 78
.
id
[optional]
The ID [XML] of this element, which must be unique within the document scope.
properties
[optional]
A space-separated list of CURIEs [RDFa11 Core] that each resolve to a term
in one of the vocabularies defined in the
metadata profile or package
element prefix attribute.
Refer to Spine itemref
properties
for a set of properties defined by this
specification.
Empty
Each itemref
element must reference, via its
idref
attribute, an
item
in the manifest. The spine
consequently represents
an ordered subset of the Publication Resources listed in the manifest, with
content items not being referenced being ancillary to those that do appear
there.
Each manifest item
referenced
from the spine
must either be: a) an EPUB Content Document; or, b) another type of Publication Resource which,
regardless of whether it is a Core Media Type Resource or a Foreign Resource
, must include
an EPUB Content Document in its fallback chain.
The references provided in the spine must resolve to either XHTML Content Documents or SVG Content Documents. References should resolve to XHTML Content Documents, but may resolve to SVG Content Documents when an alternative representation of the same content utilizing XHTML Content Documents is included, or the nature of the content being represented is inherently unsuitable to representation in XHTML.
Although the EPUB Navigation Document is required in EPUB Publications, it is
optional to include it in the spine
.
The itemref
element linear
attribute indicates
whether a spine item is considered primary (yes
) or auxiliary
(no
). This attribute may be used to enable Reading
Systems to distinguish presentation of body content from supplementary content
which might be, for example, presented in a popup window, or omitted from an
aural rendition.
Reading Systems must provide a means of rendering a Publication in the order
defined by the spine
, which includes: a) recognizing the first
primary (linear='yes'
) item
in the
spine
as the beginning of the main reading order of the
publication; and, b) rendering successive primary items in the order given in
the spine
.
Examples
The following example shows a spine
element
corresponding to the manifest example
above.
<spine> <itemref idref="intro"/> <itemref idref="c1"/> <itemref idref="c1-answerkey" linear="no"/> <itemref idref="c2"/> <itemref idref="c2-answerkey" linear="no"/> <itemref idref="c3"/> <itemref idref="c3-answerkey" linear="no"/> <itemref idref="notes" linear="no"/> </spine>
guide
Element [DEPRECATED]The guide
element [OPF2] is deprecated in
favor of the landmarks
feature in the EPUB Navigation Document. Refer to
The landmarks
nav Element
[ContentDocs30]
for more information.
Authors may include the guide
element in the Package Document for
EPUB 2 Reading System forwards compatibility purposes. EPUB 3 Reading Systems
must ignore the guide
element when provided in EPUB 3 Publications
whose EPUB Navigation Document includes the
landmarks
feature.
bindings
ElementThe bindings
element defines a set of custom handlers for media
types not supported by this specification.
The package element may contain at most one bindings
element.
When present, Reading Systems that support scripting must utilize the
bindings
element to handle object
elements in
XHTML Content Documents that reference MIME media types that are not natively
supported. When encountering such references, a Reading System must instantiate
the designated XHTML Content Document handler as if it had been referenced from
the object
element data
attribute with the following
URL parameters:
src
the value of which must be an IRI [RFC3987] to the resource (i.e., the value of the
object
element's data
attribute).
type
the value of which must be the resource
media type (i.e., the value of the object
element's
media-type
attribute).
All param
children of the object
element must be
similarly encoded as URL parameters using the param
's
name
attribute as the new parameter name and its
value
attribute as the new value.
All reserved and non-ASCII characters in the generated query string values must be URL encoded.
The following example shows an example of an object
element
containing a non-native media type and the resulting query string after
handling.
<object data="horse.ogg" media-type="audio/ogg"/> <param name="autoplay" value="false"> </object> Resulting URI query string: src=horse.ogg&type=audio/ogg&autoplay=false
The following partial example illustrates how bindings can be used to provide a default implementation.
<manifest> <item id="pict1" href="images/Pict1.jpg" media-type="image/jpeg"/> … <item id="content" href="content.xhtml" media-type="application/xhtml+xml"/> <item id="impl" href="impl.xhtml" media-type="application/xhtml+xml"/> <item id="slideshow" href="slideshow.xml" media-type="application/x-demo-slideshow"/> </manifest> <bindings> <mediaType media-type="application/x-demo-slideshow" handler="impl"/> </bindings> in content.xhtml: … <object data="slideshow.xml" type="application/x-demo-slideshow"> <!-- if scripting is not available, just show them inline --> <img src="images/Pict1.jpg"/> <img src="images/Pict2.jpg"/> <img src="images/Pict3.jpg"/> <img src="images/Pict4.jpg"/> </object> … in slideshow.xml: <slides> <slide src="images/Pict1.jpg" dur="3"/> <slide src="images/Pict2.jpg" dur="3"/> <slide src="images/Pict3.jpg" dur="3"/> <slide src="images/Pict4.jpg" dur="3"/> </slides>
mediaType
ElementThe mediaType
element associates a non-native media type with a
handler (the handler provides a default script-based implementation for items of
the given media type when they are referenced from object
elements
in a XHTML Content Document).
Each child mediaType
of a bindings
element must
define a unique content type in its media-type
attribute. The media
type specified must not be a Core Media Type.
The required handler
attribute must reference the ID [XML] of an item in the manifest of the default implementation for this media
type. The referenced item
must be an XHTML Content Document.
The Package Document's author is responsible for including a primary
identifier that is unique to one and only one particular EPUB Publication. This Unique Identifier,
whether chosen or assigned, must be stored in a
dc:identifier
element in the Package
metadata
section and be referenced as the Unique
Identifier in the package
element
unique-identifier
attribute.
Although not static, changes to the Unique Identifier for a Publication should be made as infrequently as possible. New identifiers should not be issued when updating metadata, fixing errata or making other minor changes to the Publication.
The Unique Identifier of an EPUB Publication typically should not change with each minor revision to the package or its contents, as Unique Identifiers are intended to have maximal persistence both for referencing and distribution purposes. Each release of a Publication normally requires that the new version be uniquely identifiable, however, which results in the contradictory need for reliable Unique Identifiers that are changeable.
To redress this problem of identifying minor modifications and releases without changing the
Unique Identifier, this specification defines the semantics for a Package
Identifier, or means of distinguishing and sequentially ordering Publications
with the same Unique Identifier. The Package Identifier is not an actual
property in the package metadata
section, but is a value that
can be obtained from two required pieces of metadata: the Unique Identifier and
the last modification date of the Publication.
When the taken together, the combined value represents a unique identity that
can be used to distinguish any particular version of an EPUB Manifestation
from another. To ensure
that a Package Identifier can be constructed, the Publication must include
exactly one [DCTERMS]
modified
property containing the last
modification date (see meta). The value of this
property must be an XML Schema [XSD-DATATYPES] dateTime
conformant date of the form:
CCYY-MM-DDThh:mm:ssZ
The modification date must be expressed in Coordinated Universal Time (UTC)
and must be terminated by the Z
time zone indicator.
Although not a part of the package metadata, for referencing and other
purposes this specification requires that all string representations of the
identifier be constructed using the @
character as the
separator (i.e., of the form "id@
date"). Whitespace must not
be included when concatenating the strings.
It is possible that the separator character may occur in the unique
identifier, as unique identifiers may be any string value. The Package
Identifier consequently must be split on the last instance of the
@
character when decomposing it into its component
parts.
The following example shows how a unique identifier and modification date are combined to form the Package Identifier.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:identifier id="pub-id">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</dc:identifier> <meta property="dcterms:modified">2011-01-01T12:00:00Z</meta> … </metadata> results in the Package ID: urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809@2011-01-01T12:00:00Z
The Package Identifier does not supersede the Unique Identifier, but represents the means by which different versions of the same Publication can be distinguished and identified in distribution channels and by Reading Systems. The sequential, chronological order inherent in the required format of the timestamp also places Publications in order without requiring knowledge of the exact identifier that came before.
The Package Identifier consequently allows a set of Publications to be inspected to determine if they represent the same version of the same Publication, different versions of a single Publication, or any combination of differing and similar Publications.
This specification represents a shift from using traditional XML-based grammars to express Publication metadata to an approach based on a standardized syntax that incorporates well-defined terms from external vocabularies. Unlike XML grammars, which intrude into host grammars, often require special extensions and require learning the new grammar to implement, the new approach represents a more fluid means of expressing metadata: a few container elements are now capable of expressing the full range of Publication metadata and provide a predictable way to add and extend using industry-standard vocabularies.
Although support for the expression of metadata allows properties from a wide variety of vocabularies to be easily incorporated to express and refine information about an EPUB Publication, it is not expected that all Reading Systems will be able to handle this transition initially. To ensure that older Reading Systems that require the presence of the required DCMES elements do not fail to open new EPUB Publications, this specification represents a transitionary stage, incorporating both methods of metadata expression.
While this specification requires the use of the DCMES title
,
identifier
and language
elements, their deprecation is
expected in a future version. Content authors are consequently strongly encouraged to begin
using the new properties from the DCTERMS
vocabulary, including the properties that supersede the required DCMES elements. The
prefer attribute has
been added to each DCMES element to allow authors to designate the new property that
replaces the element during this transitionary phase, which also ensures that EPUB
Publications created to this specification will continue to function when element
support is phased out.
This section is informative
The following sections enumerate key properties — both defined as part of this specification and by external agencies — that Reading Systems must minimally recognize. It is not intended to be a comprehensive list of vocabularies or properties that can be used to add or annotate package metadata.
Properties defined by this specification are made available for use in the EPUB 3 Package Metadata Vocabulary, which is the default vocabulary defined in the Package Document's metadata profile.
Property usage examples in the following sections have been drawn from the
metadata
examples
whenever possible. Refer to those examples for fuller context.
meta
propertiesThe meta
element property
attribute
may define any property from DCMI Metadata Terms [DCTERMS] for expressing metadata about the package and its contents.
For more information about these properties and their use, please refer to the vocabulary.
For specific restrictions and requirements imposed by this specifiction on
the language
and modified
properties,
refer to dc:language and Package Identifier, respectively.
Package properties define information about the package and should not be used to annotate other properties.
Package properties must not be attached to other metadata elements and
properties using the about
attribute. The cardinality
property in the following tables refers only to the number of times the
property may be included in the metadata
section.
The following tables detail the available properties.
› page-progression-direction
|
|
Description: | The
page-progression-direction property
indicates the global direction in which the publication
content flows. |
Allowed value(s): |
rtl | ltr
|
Cardinality: |
zero or one
|
Example: |
<meta prop2.erty="page-progression-direction">ltr</meta>
|
› publication-type
|
|
Description: | The
publication-type property indicates,
that the given Publication is of a specialized type (e.g.,
annotations packaged in EPUB format or a dictionary). Each
specification defining a specialized Publication type is
expected to define the value to use. |
Allowed value(s): |
xsd:string
|
Cardinality: |
zero or one
|
Example: |
<meta property="publication-type">dictionary</meta>
|
› source-identifier
|
|
Description: | The
source-identifier property specifies
the identifier of the source publication
this EPUB Publication represents.
|
Allowed value(s): |
xsd:string
|
Cardinality: |
zero or one
|
Example: |
<meta property="source-identifier">urn:isbn:9780375704024</meta>
|
Ancillary properties represent metadata about metadata and are intended to augment metadata defined elsewhere in the package.
Ancillary properties must always be attached to another metadata element
or property using the about
attribute.
The following tables detail the available properties.
› alternate-script
|
|
Description: | The
alternate-script property provides an
alternate expression of the associated property value in a
language and script identified by the
xml:lang attribute. The property is
typically attached to creator and
title properties for
internationalization purposes. |
Allowed value(s): |
xsd:string
|
Cardinality: |
In the metadata section: Attached to other metadata: |
Extends: | All properties. |
Example: |
<meta about="#creator" property="alternate-script" xml:lang="ja">村上 春樹</meta>
|
› display-seq
|
|
Description: | The
display-seq property indicates the
numeric position in which to display the current property
relative to identical metadata properties. For example, to
indicate the order in which to render multiple
title s. |
Allowed value(s): |
xsd:unsignedInt
|
Cardinality: |
In the metadata section: Attached to other metadata: |
Extends: | All properties. |
Example: |
<meta about="#t2" property="display-seq">1</meta>
|
› file-as
|
|
Description: | The file-as
property provides the normalized form of the associated
property for sorting. |
Allowed value(s): |
xsd:string
|
Cardinality: |
In the metadata section: Attached to other metadata: |
Extends: | All properties. |
Example: |
<meta about="#creator" property="file-as">Murakami, Haruki</meta>
|
› group-position
|
|
Description: |
The The A Publication can belong to more than one group. |
Allowed value(s): |
A single xsd:unsignedInt or series of decimal-separated
numbers (e.g., 1 or 2.2.1 ).
|
Cardinality: |
In the metadata section: Attached to other metadata: |
Extends: | All properties. |
Example: |
<meta about="#t3" property="group-position">2</meta>
|
› meta-auth
|
|
Description: | The
meta-auth property provides the name
of a party or authority responsible for an instance of
package metadata. |
Allowed value(s): |
xsd:string
|
Cardinality: |
In the metadata section: Attached to other metadata: |
Extends: | All properties. |
Example: |
<meta about="isbn-id" property="meta-auth" id="meta-authority-01">Metadata Authority Inc.</meta>
|
› role
|
|
Description: | The role
property describes the nature of work performed by a
creator or
contributor . For example, that they
represent the author or editor of a publication. |
Allowed value(s): |
It is recommended that values be drawn from MARC Code List for Relators and ONIX 3.0 Code List 17 Issue 79. |
Cardinality: |
In the metadata section: Attached to other metadata: |
Extends: |
contributor , creator
|
Example: |
<meta about="#creator" property="role">aut</meta>
|
› scheme
|
|
Description: | The scheme
property identifies the formal system used to express the
value of an identifier or
subject . |
Allowed value(s): |
It is recommended that values be drawn from recognized scheme lists, such as ONIX 3.0 Code List 27 for subjects. Issue 79. |
Cardinality: |
In the metadata section: Attached to other metadata: |
Extends: | All properties. |
Example: |
<meta about="#pub-id" property="scheme">uuid</meta>
|
› title-type
|
|
Description: |
The
|
Allowed value(s): |
primary | short |
long | sub |
series |
collection |
edition | slang
|
Extends: |
title , |
Cardinality: |
In the metadata section: Attached to other metadata: |
Example: |
<meta about="#title" property="title-type">primary</meta>
|
link
propertiesThe following tables define properties for use in the metadata
link
element
rel
attribute.
› marc21xml-record
|
|
Description: | The
marc21xml-record property indicates the
referenced resource is a MARC21 record [MARC21XML]. |
Cardinality: |
Zero or one
|
Extends: | Only applies to the Publication. Must not be used when the about attribute is present. |
Example: |
<link rel="marc21xml-record" href="pub/meta/nor-wood-marc21.xml"/>
|
› mods-record
|
|
Description: | The mods-record
property indicates the referenced resource is a MODS record
[MODS]. |
Cardinality: |
Zero or one
|
Extends: | Only applies to the Publication. Must not be used when the about attribute is present. |
Example: |
<link rel="mods-record" href="pub/meta/nor-wood-mods.xml"/>
|
› onix-record
|
|
Description: | The onix-record
property indicates the referenced resource is an ONIX record
[ONIX]. |
Cardinality: |
Zero or one
|
Extends: | Only applies to the Publication. Must not be used when the about attribute is present. |
Example: |
<link rel="onix-record" href="pub/meta/nor-wood-onix.xml"/>
|
› xml-signature
|
|
Description: |
The The |
Cardinality: |
Zero or more
|
Extends: | All properties. |
Example: |
<link about="#meta-authority-01" rel="xml-signature" href="../META-INF/signatures.xml#MAI-Signature"/>
|
› xmp-record
|
|
Description: | The xmp-record
property indicates the referenced resource is an XMP record
[XMP]. |
Cardinality: |
Zero or one
|
Extends: | Only applies to the Publication. Must not be used when the about attribute is present. |
Example: |
<link rel="xmp-record" href="pub/meta/nor-wood-xmp.xml"/>
|
item
propertiesThe following tables define properties for use in the manifest
item
element
properties
attribute.
The Applies to
field indicates which Publication Resource
type(s) the given property may be specified on, the
Cardinality
field indicates the number of times the
property must appear within the Package Document scope, and the
Usage
field indicates usage conditions.
› cover-image
|
|
Description: | The cover-image
property identifies the described Publication Resource as the
cover image for the Publication. |
Applies to: | All raster and vector image types |
Cardinality: |
Zero or one
Issue 45
|
Usage: | Optional |
› mathml
|
|
Description: | The mathml
property indicates that the described Publication Resource
contains one or more instances of MathML markup. |
Applies to: | EPUB Content Documents |
Cardinality: |
Zero or more
|
Usage: | Must be set if and only if the criterion specified in
Description above is met. |
› nav
|
|
Description: | The nav property
indicates that the described Publication Resource constitutes
the EPUB Navigation Document of the
Publication. |
Applies to: | The EPUB Navigation Document |
Cardinality: |
Exactly one
|
Usage: | Required |
› 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 (refer to Publication Resource Locations for more
information). |
Applies to: | All Publication Resources with the capability of internal referencing (e.g., XHTML Content Documents, SVG Content Documents, EPUB Style Sheets and Media Overlay Documents) |
Cardinality: |
Zero or more
|
Usage: | Must be set if and only if the criterion specified in
Description above is met. |
› scripted
|
|
Description: | The scripted
property indicates that the described Publication Resource is a
Scripted Content Document (i.e.,
contains scripted content and/or elements from HTML5
forms ). |
Applies to: | EPUB Content Documents |
Cardinality: |
Zero or more
|
Usage: | Must be set if and only if the criterion specified in
Description above is met. |
› svg
|
|
Description: | The svg property
indicates that the described Publication Resource contains one
or more instances of SVG markup. |
Applies to: | XHTML Content Documents; the value is implied for SVG Content Documents. |
Cardinality: |
Zero or more
|
Usage: | Must be set if and only if the criterion specified in
Description above is met. |
The mathml
,
remote-resources
, scripted
and svg
properties are recursive; they must be specified on applicable
item
s regardless of whether the property holds true for the
resource described by the current item
element or to a resource
embedded within it (e.g., the scripted
property must be specified
on an item
element representing a non-scripted XHTML Content
Document if it embeds a Scripted Content Document).
Examples
The following example shows a manifest
item
element that represents the cover image of a
Publication.
<item properties="cover-image" id="ci" href="cover.svg" media-type="image/svg+xml" />
The following example shows a manifest
item element representing a Scripted Content Document that also contains
embedded MathML
.
<item properties="scripted mathml" id="c2" href="c2.xhtml" media-type="application/xhtml+xml" />
itemref
propertiesThe following tables define properties for use in the itemref element
properties
attribute.
The Cardinality
field indicates the number of times the
property must appear within the Package Document scope, and the
Usage
field indicates usage conditions.
› page-spread-left
|
|
Description: | The
page-spread-left property indicates that
the first page of the associated item 's EPUB Content Document represents the
left-hand side of a two-page spread. |
Cardinality: |
Zero or more
|
Usage: | Optional. This property must not be specified on an
itemref that also specifies the
page-spread-right property. |
› page-spread-right
|
|
Description: | The
page-spread-right property indicates that
the first page of the associated item 's EPUB Content Document represents the
right-hand side of a two-page spread. |
Cardinality: |
Zero or more
|
Usage: | Optional. This property must not be specified on an
itemref that also specifies the
page-spread-left property. |
Examples
The following example shows how a two-page spread of a map might be
indicated in the spine
.
<spine> <itemref idref="title"/> <itemref idref="ps-1-l" properties="page-spread-left"/> <itemref idref="ps-1-r" properties="page-spread-right"/> <itemref idref="toc"/> … </spine>
The following table lists the EPUB 3 Core Media Types. When a Publication Resource conforms to a Core Media Type specification, it is a Core Media Type Resource and can be included in the Publication without the provision of fallbacks (refer to Fallback Requirements and Processing Flow for more information).
The columns in the table represent the following information:
The MIME type [RFC2046] used to represent the given Publication Resource in the manifest.
The specification to which the given Core Media Type Resource must conform.
The Publication Resource type(s) that the MIME String and Content Type Definition applies to.
MIME String | Content Type Definition | Applies to |
---|---|---|
Image Types | ||
image/gif
|
[GIF] | GIF Images |
image/jpeg
|
[JPEG] | JPEG Images |
image/png
|
[PNG] | PNG Images |
image/svg+xml
|
SVG Content Documents [ContentDocs30] | SVG documents |
Application Types | ||
application/xhtml+xml
|
XHTML Content Documents [ContentDocs30] | XHTML Content Documents and the EPUB Navigation Document. |
application/x-dtbncx+xml
|
[OPF2] | The superseded NCX |
application/vnd.ms-opentype
|
[OpenType] | OpenType fonts |
application/font-woff
|
[WOFF] | WOFF fonts |
application/smil+xml
|
[MediaOverlays30] | EPUB Media Overlay documents |
application/pls+xml
|
[PLS] | Text-to-Speech (TTS) Pronunciation lexicons |
Audio Types | ||
audio/mpeg (
RFC3003
) |
[MP3] | MP3 audio |
audio/aac
|
[MP4 AAC LC] | Used for MP4 AAC LC audio when not embedded in the video container. Reading System support only required when the Reading System also supports video/mp4 |
Video Types | ||
video/mp4
Issue 75
|
[H.264] | MPEG-4 video; must use H.264 Basic Profile video
and MP4 AAC LC audio [MP4 AAC LC]. (In HTML
video element type attribute:
"video/mp4; codecs='avc1.42E01E,
mp4a.40.2'" ) |
Text Types | ||
text/css
|
EPUB Style Sheets [ContentDocs30] | EPUB Style Sheets. |
EPUB Publications may reference Foreign Resources. In order to ensure that all EPUB Publications can be successfully rendered by Reading Systems, alternative fallback resources must be provided for each such resource.
Fallbacks are provided either via intrinsic mechanisms defined for certain Publication Resource types, or via a manifest-level fallback mechanism. These mechanisms are defined in this section.
Unless one of the exceptions defined in Intrinsic fallback apply, fallbacks must be
provided for each Foreign Resource using the
fallback attribute on the manifest
item element that represents the Foreign Resource.
The fallback
attribute's IDREF [XML] value
must resolve to another item
in the manifest
.
This fallback item
may itself specify another fallback
item
, and so on. The ordered list of all the ID references that
can be reached starting from a given item's fallback
attribute
represents the fallback chain for that item. A fallback chain must contain at
least one Core Media Type Resource and must not contain
any circular- or self-references to item
s in the chain.
A Reading System that does not support the Media Type of a given Publication Resource must traverse the fallback chain until it encounters a supported Publication Resource. The resource identified by the fallback item is then used in place of the unsupported item.
Fallbacks may also be provided for Publication Resources that are Core Media Type Resources; a Reading System may choose to utilize such fallbacks in order to find the optimal version of a resource to render in a given context. An example of when this feature can be utilized is when providing fallbacks for scripted content [ContentDocs30] .
Manifest fallback is required for any Publication Resource referenced from the spine that is not an EPUB Content Document.
TODO Fallbacks for xhtml-nav, and possibly other core media types, are not legal. Determine which they are and add here.
This section defines a set of exceptions to the general requirements for manifest-level fallbacks for Foreign Resources. If none of these exceptions apply to a given Foreign Resource reference, then the manifest fallback mechanism must be used to supply a Core Media Type Resource fallback.
object
For Foreign Resources referenced via HTML5 object
elements, Core Media Type fallback(s) must be provided via that
element’s intrinsic replacement capabilities.
Reading Systems must ignore manifest-level fallbacks in
resolving such references. (Note that the
bindings
element provides a type of fallback mechanism, but does not
ensure that content can be rendered on all Reading Systems
regardless of scripting support).
img
For Foreign Resources referenced via HTML5 img
elements, the text value of the alt
and
title
attributes provides a legitimate fallback
and should be included. Additional manifest-level fallbacks may
be provided.
Reading Systems should process manifest-level fallbacks in resolving such references.
source
For Foreign Resources referenced via HTML5
source
elements when used inside
media elements
, Core Media Type
fallback(s) must be provided in at least one source
child element of the given media element.
Reading Systems must ignore manifest-level fallbacks in resolving such references.
As defined in
iframe src type restriction
[ContentDocs30]
, only XHTML Content
Documents must be referenced via iframe
elements; the
provision of fallbacks for Foreign Resources is therefore inapplicable
to iframe
elements.
For fonts embedded in Content Documents or EPUB Style Sheets
using the @font-face
mechanism, the rules of CSS
[CSS3Fonts] must be used to provide a
fallback in case a non-core media type font format is used. Such
fallback must be a Core Media Type embedded font or generic font
reference.
Reading Systems must ignore manifest-level fallbacks in resolving CSS font references.
All Publication Resources must be located in the EPUB Container, with the following exceptions:
› Audio resources may be located in the Container or remotely.
› Video resources may be located in the Container or remotely.
Authors should prefer locating audio and video resources in the Container to allow the user access to the entire presentation regardless of connectivity status.
These rules for Publication Resource locations apply regardless of whether the given resource is a Core Media Type Resource or a Foreign Resource.
The inclusion of remote resources in an EPUB Publication is indicated via the
remote-resources
property on the manifest
item
element.
Any Publication Resource which is an XML-Based Media Type must meet the following constraints:
› It must be a conformant XML 1.0 Document as defined in Conformance of Documents [XMLNS].
› External identifiers must not appear in the document type declaration [XML].
› It must not make use of XInclude [XInclude].
The above constraints apply regardless of whether the given Publication Resource is a Core Media Type Resource or a Foreign Resource.
This feature is at risk in EPUB 3.
EPUB Canonical Fragment Identifiers are included in this specification draft with a tentative status . Depending on input received during the review phase, this feature may be substantially revised or withdrawn. It may also be moved from this specification to a separate IDPF document.
An EPUB Canonical Fragment Identifier (CFI) is a component of a URI or IRI that identifies a location inside an EPUB Content Document.
An EPUB Canonical Fragment Identifier has the following functional properties:
it allows every location in a document to be identified;
it allows two identifiers to be compared to determine which location comes first without having access to the content or structure of EPUB file; and
it allows reasonably efficient processing (i.e., resolving a location
in one Content Document does not require processing of the other Content
Documents in the spine
).
As such, the CFI scheme is primarily intended to be used in contexts such as collaborative annotations and server-side bookmarks. Note that CFIs are only reliable in contexts where the content has a static structure.
This specification defines only the CFI scheme, but does not restrict the development of future additional schemes for EPUB, nor does it restrict or prevent the use of the (ID-based) URI fragment identifier scheme for intra-publication document links.
Each CFI represents a single location in a Content Document. A single Identifier cannot represent a range of locations; multiple Identifiers are required to express ranges. Identifiers are also not intended to be human readable, but are optimized for machine processing.
The following syntax is provided for CFIs (using CSS conventions):
fragment : "#epubcfi=" [navstep]+ [termstep]? [side]? navstep : "/" integer | "!" ["/"]? integer termstep : ":" integer | "@" number "," number | "~" number side : "b" | "a" number : ["-"]? digit+ ["." digit+]? integer: digit+
Each CFI begins with a hash symbol (#
) identifying it as a
fragment identifier. The hash symbol is followed by the initial sequence
epubcfi=
, which identifies that the fragment conforms to this
scheme.
After establishing the scheme, a CFI consists of a sequence of steps, each of
which is either navigational (can be repeated) or terminating (must come last in
the sequence). An optional side designator can also occur after the step
sequence to identify a location that "sticks" to the content that comes
before
(b
) or
after
(a
) it. This designator is
needed, for example, to determine which page a location falls on when it occurs
at the page boundary.
An example of a Fragment Identifier.
#epubcfi=/2/6/4!/2/4/10/3:10
Leading zeros are not allowed for numbers and integers, except to represent zero. Trailing zeros are not allowed in number fractional part to ensure uniqueness.
The processing model presented in this section assumes that all documents are parsed in W3C DOM for convenience, but other XML representations can be used.
An EPUB Canonical Fragment Identifier is processed by applying the following rules, in order, starting from the root (document) XML node of an EPUB Content Document:
Slash-number steps refer to child node(s) as follows:
Each element or processing instruction (PI) is assigned an even positive index (e.g., the first element/PI is given index 2, the second element/PI 4, etc.). Note that the XML declaration is not considered a PI in this processing model.
Each (possibly empty) collection of nodes before the first element/PI, between elements/PIs, and after last element/PI are given odd indices according to their position.
This indexing scheme ensures that nodes are not sensitive to XML parser handling of whitespace, entity references, and CDATA sections.
Column-number steps refer to a character offset as follows:
When dealing with an element, the result is a UTF-16 code unit
index in the element's intrinsic textual value. This value is
empty for most elements, except for the HTML5 img
tag when the alt
attribute value is used.
When dealing with a text node or a collection of nodes, the UTF-16 code unit index is calculated after concatenating text data from all the nodes. The position is zero-based and always refers to a place between characters, so 0 means before the first character, and a number equal to the total UTF-16 length means position after the last character.
UTF-16 is used to be consistent with other XML specifications that are likely to be used to implement fragment identifiers, namely W3C DOM, ECMAScript, and XPath.
An exclamation point step indicates the next step should be applied starting from the target node (or root node, when the complete XML document is referenced). The following specific references are honored:
opf:itemref
refers to the Content Document
referenced by the href
attribute of the
item
element with the given ID;
for the HTML5 img
, iframe
and
embed
elements, references are defined by
src
attribute;
for the HTML5 object
element, the reference is
defined by the data
attribute;
for SVG image
and use
elements,
references are defined by the xlink:href
attribute.
This scheme does not take into account hyperlinks, only "embedding"
references; it is consequently illegal to follow links from HTML5 (or
SVG) a
elements.
An at-number step indicates 2D spatial position (e.g., on an image) using x and y in the image's natural coordinate system:
1 bitmap pixel for bitmap images with origin in top left corner, and with x going right and y going down;
1 logical unit for vector images.
For SVG images, the coordinate system inside the svg
element is typically used (not the viewport coordinate system, which
is too layout-dependent).
A tilde-number step indicates a temporal position for audio/video, measured in seconds.
Spatial and temporal positions can be combined together, but not other types. The Temporal step must always precede the spatial step syntactically.
Some elements (e.g., HTML5 img
) can allow more than one of
the steps defined above.
When producing CFIs for text locations, unless the text is defined by the
img
element's alt
attribute, processing should
always start with the text node or text node collection (even if it is empty)
that corresponds to the location, and then trace the ancestor and reference
chain to the OPF file root.
The following conditions apply when sorting CFIs:
steps that come earlier in the sequence are more important than those that come later;
XML children nodes, character offsets and temporal positions are sorted in natural order;
y position is more important than x;
omitted spatial position precedes all other spatial positions;
omitted temporal position precedes all other temporal positions;
temporal position is more important than spatial; and
different step types come in the following order from least important to more important: character offset, child, temporal/spatial, reference.
The fragment identifier in the example above refers to the position right after the digit 9 in the following sample documents:
A Package Document
<?xml version="1.0"?> <package … > <metadata> … </metadata> <manifest> … </manifest> <spine> <itemref idref="titlepage"/> <itemref idref="chapter01"/> <itemref idref="chapter02"/> <itemref idref="chapter03"/> <itemref idref="chapter04"/> </spine> </package>
chapter01.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>…</title> </head> <body> <p>…</p> <p>…</p> <p>…</p> <p>…</p> <p>aaa <em>bbb</em>0123456789</p> <p>…</p> <p>…</p> <img src="foo.svg"/> <p>…</p> <p>…</p> </body> </html>
The following table shows additional examples of CFIs and what they select from the preceding example documents:
#epubcfi=/2/6/4!/2/4/16
|
img element |
#epubcfi=/2/6/4!/2/4/16!/2/2
|
first child element of the root svg element in
foo.svg
|
#epubcfi=/2/6/4!/2/4/10/1:0
|
location just before aaa |
#epubcfi=/2/6/4!/2/4/10/2/1:0
|
location just before bbb |
#epubcfi=/2/6/4!/2/4/10/2/1:3b
|
location just after bbb, sticking "before" |
CFIs can also be used to cross-reference XML content inside the Publication.
Such use is intended to be used primarily when the default URI/IRI fragment
identification scheme for XML (providing a reference to an XML Name) cannot be
employed. A relative reference to a particular resource in the spine should be
given (as usual), followed by the CFI component which should be resolved
starting from the referenced documents root. For instance,
chapter02.xhtml
might give a reference to the last
location in the previous example like this:
…
<a href="chapter01.xhtml#epubcfi(/2/4/10/2/1:3b)">location</a>
…
The schema for Package Documents is available at http://www.idpf.org/epub/30/schema/package-30.nvdl.
This schema is normative. In case of conflicts between the specification prose and this schema, the schema shall be considered definitive.
Validation using this schema will require a processor that supports [NVDL], [RelaxNG] and [ISOSchematron].
Note, however, that the NVDL schema layer can be substituted by a multi-pass validation using the embedded RELAX NG and ISO Schematron schemas alone.
This appendix is informative
EPUB has been developed by the International Digital Publishing Forum in a cooperative effort, bringing together publishers, vendors, software developers, and experts in the relevant standards.
The EPUB 3 specifications were prepared by the International Digital Publishing Forum’s EPUB Maintenance Working Group, operating under a charter approved by the membership in May, 2010 under the leadership of:
Markus Gylling DAISY Consortium Chair |
Garth Conboy Google Inc. Vice-chair |
Brady Duga Google Inc. Vice-chair |
Bill McCoy International Digital Publishing Forum (IDPF) Secretary |
Active members of the working group included:
Alexis Wiles, Alicia Wise, … TODO : COMPLETE LIST OF CURRENT WG MEMBERS
For more detailed acknowledgements and information about contributors to each version of EPUB, refer to Contributors [EPUB3Overview] .
[ASSOCSS] Associating Style Sheets with XML documents 1.0 (Second Edition) . 28 October 2010.
[CSS3Fonts] CSS Fonts Module Level 3 .
[ContentDocs30] EPUB Content Documents 3.0 .
[DCTERMS] DCMI Metadata Terms .
[ISOSchematron] ISO/IEC 19757-3: Rule-based validation — Schematron .
[MARC21XML] MARC 21 XML Schema .
[MP4 AAC LC] ISO/IEC 14496-3:2009 - Information technology -- Coding of audio-visual objects -- Part 3: Audio .
[MediaOverlays30] EPUB Media Overlays 3.0 .
[OCF2] Open Container Format 2.0.1 .
[OCF3] Open Container Format 3.0 .
[ONIX] ONIX for Books .
[OPF2] Open Packaging Format 2.0.1 .
[OPS2] Open Publication Structure 2.0.1 .
[OpenType] ISO/IEC 14496-22:2009 - Information technology -- Coding of audio-visual objects -- Part 22: Open Font Format .
[PLS] Pronunciation Lexicon Specification 1.0 (PLS) . 14 October 2008.
[PNG] Portable Network Graphics (PNG) Specification (Second Edition) . 10 November 2003.
[PackageProfile] Vocabulary Profile for EPUB 3 Package Documents .
[PackageVocab] EPUB 3 Package Metadata Vocabulary TODO Issue 74 .
[Publications30] EPUB Publications 3.0 .
[RDFa11 Core] RDFa Core 1.1 . Syntax and processing rules for embedding RDF through attributes. 26 October 2010.
[RFC2046] Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types (RFC 2046) . November 1996.
[RFC2119] Key words for use in RFCs to Indicate Requirement Levels (RFC 2119) . March 1997.
[RFC3987] Internationalized Resource Identifiers (IRIs) (RFC 3987) . January 2005.
[RFC4839] Media Type Registrations for the Open eBook Publication Structure (OEBPS) Package File (OPF) (RFC 4839) . April 2007.
[RFC5646] Tags for Identifying Languages (RFC 5646) . September 2009.
[RelaxNG] ISO/IEC 19757-2: Regular-grammar-based validation — RELAX NG. Second Edition . 2008-12-15.
[Unicode] The Unicode Consortium. The Unicode Standard, Version 5.0.0, defined by: The Unicode Standard, Version 5.0 (Boston, MA, Addison-Wesley, 2007. ISBN 0-321-48091-0).
[WOFF] WOFF File Format 1.0 . .
[XInclude] XML Inclusions (XInclude) Version 1.0 (Second Edition) . 15 November 2006.
[XML] Extensible Markup Language (XML) 1.0 (Fifth Edition) . 26 November 2008.
[XML Base] XML Base (Second Edition) . 28 January 2009.
[XML DSIG Core] JP: 1.1 going to CR in Q1 2011. Update reference as necessary XML-Signature Syntax and Processing (Second Edition) . 10 June 2008.
[XMLNS] Namespaces in XML (Third Edition) . 8 December 2009.
[XMP] TODO spec ref .
[XSD-DATATYPES] XML Schema Part 2: Datatypes Second Edition . 28 October 2004.
[EPUB3Changes] EPUB 3 Differences from EPUB 2.0.1 . .
[EPUB3Overview] EPUB 3 Overview .