From df771e9940ab0cbcaa625b9cac24f9a0a4aaa614 Mon Sep 17 00:00:00 2001 From: Matt Garrish Date: Sat, 2 Apr 2022 16:19:46 -0300 Subject: [PATCH 1/5] clean up manifest fallbacks section and add extra caution about content fallbacks --- epub33/core/index.html | 168 ++++++++++++++++++++--------------------- 1 file changed, 81 insertions(+), 87 deletions(-) diff --git a/epub33/core/index.html b/epub33/core/index.html index a73ec0e48..860d62df4 100644 --- a/epub33/core/index.html +++ b/epub33/core/index.html @@ -341,10 +341,9 @@

Terminology

EPUB Content Document
-

A Publication Resource referenced from the spine or a manifest fallback chain that conforms to either the - XHTML or SVG - Content Document definitions.

+

A Publication Resource referenced from the spine or a manifest fallback chain + that conforms to either the XHTML or SVG Content Document definitions.

EPUB Content Documents contain all or part of the content of an EPUB Publication (i.e., the textual, visual and/or audio content).

EPUB Creators can include EPUB Content Documents in the spine without the provision of @@ -442,11 +441,10 @@

Terminology

Any Publication Resource referenced from a spine - itemref element, or a manifest fallback chain, that is not an EPUB - Content Document.

+ itemref element, or a manifest fallback + chain, that is not an EPUB Content Document.

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.

+ requires a manifest fallback chain with at least one EPUB Content Document.

With the exception of XHTML and SVG, all Core Media Type Resources are Foreign Content Documents when referenced directly from the spine.

@@ -851,7 +849,7 @@
The Spine Plane
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 fallback chain.

+ Document in a manifest fallback chain.

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 @@ -876,13 +874,11 @@

The Spine Plane
The Content Plane
-

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

+

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.

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 @@ -1287,12 +1283,13 @@

Exempt Resources

>video — including any child source elements — are Exempt Resources.

-
-

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.

-
+
+

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.

+
@@ -1340,64 +1337,57 @@
Manifest Fallbacks

Reading System support for manifest fallbacks is poor and should not be relied upon to create interoperable content. In most cases, if a Reading System does not support a format, it will not use its fallback. This can lead to unexpected failures.

- -

EPUB Creators should use the intrinsic fallback capabilities of HTML and SVG to provide - fallback content whenever possible, and avoid using Foreign Content Documents in the - spine.

-

Manifest fallbacks are a feature of the Package Document that create fallback chains, - allowing Reading Systems to select an alternative format they can render.

- -

There are two primary use cases for manifest fallbacks:

- -
    -
  1. To specify fallbacks when Foreign Content Documents are referenced from the spine.
  2. -
  3. To provide fallbacks when intrinsic fallback are not available for elements in EPUB Content - Documents (e.g., for the [[HTML]] img - element) in order to satisfy the requirements in .
  4. -
- -

The fallback attribute on the manifest - item element specifies the fallback for the - referenced Publication 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 a Reading System can reach, starting from a given - item's fallback attribute, represents the fallback chain for that item. - The order of the resources in the fallback chain represents the EPUB Creator's preferred - fallback order.

+

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 MUST conform to one of the following requirements, as appropriate:

+

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.

- +

There are two cases for manifest fallbacks:

-

Fallback chains MUST NOT contain circular or self-references to item elements in the - chain.

- -

EPUB Creators MAY provide fallbacks for Top-Level Content Documents that are EPUB Content - Documents (e.g., to provide fallbacks for scripted - content).

- -

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

+
+
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 Creators MAY provide fallbacks for EPUB Content Documents (e.g., to provide a fallback for scripted content).

+

When a fallback chain includes more than one EPUB Content Document, EPUB Creators can use + the properties attribute to differentiate + the purpose of each.

+
-
-

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.

-
+
Content Fallbacks
+
+
+

The purpose for keeping content fallbacks in EPUB 3 was primarily to continue to + provide a means of specifying 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.

+
+

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

+
+

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.

+
+
+
@@ -1592,9 +1582,9 @@

Introduction

identifying subcomponents within the Package.

  • -

    Manifest fallback chains — a mechanism that defines - an ordered list of top-level resources as content equivalents. A Reading System can then - choose between the resources based on which it is capable of rendering.

    +

    Manifest fallback chains — a mechanism that defines an ordered list of top-level + resources as content equivalents. A Reading System can then choose between the resources + based on which it is capable of rendering.

  • @@ -3408,9 +3398,13 @@
    The item Element
    Core Media Type Resources, EPUB Creators MUST use the media type designated in .

    -

    The fallback attribute takes an IDREF [[XML]] that - identifies a fallback for the Publication Resource referenced from the item - element, as defined in .

    +

    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.

    + +

    The fallback for one item MAY specify a fallback to another item, + and so on, creating a chain of fallback options. Manifest fallback chains MUST NOT contain + circular or self-references to item elements in the chain.

    The media-overlay attribute takes an IDREF [[XML]] that identifies the Media Overlay Document for the resource described by this @@ -3560,9 +3554,9 @@

    Examples
    @@ -3403,8 +3406,8 @@
    The item Element
    MUST resolve to another item in the manifest.

    The fallback for one item MAY specify a fallback to another item, - and so on, creating a chain of fallback options. Manifest fallback chains MUST NOT contain - circular or self-references to item elements in the chain.

    + and so on, creating a chain of fallback options. Refer to for additional requirements related to the use of fallback chains.

    The media-overlay attribute takes an IDREF [[XML]] that identifies the Media Overlay Document for the resource described by this From 8df281ced5bdc28c4cd9a9779a5f445ba5a866c0 Mon Sep 17 00:00:00 2001 From: Matt Garrish Date: Sat, 2 Apr 2022 16:37:53 -0300 Subject: [PATCH 3/5] move data url note to end of section --- epub33/core/index.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/epub33/core/index.html b/epub33/core/index.html index bca9b8ce7..8195f1135 100644 --- a/epub33/core/index.html +++ b/epub33/core/index.html @@ -1381,16 +1381,17 @@

    Manifest Fallbacks
    the fallback chain MUST contain at least one Core Media Type Resource.

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

    -
    -

    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.

    -

    Regardless of the type of manifest fallback specified, fallback chains MUST NOT contain self-references or circular references to item elements in the chain.

    + +
    +

    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.

    +
    From 08f8f651a7c79b55a1789a1d12c5ba6bb37604a5 Mon Sep 17 00:00:00 2001 From: Matt Garrish Date: Sun, 3 Apr 2022 09:36:13 -0300 Subject: [PATCH 4/5] group intrinsic fallbacks into new "Resource Fallbacks" section; remove caution note for manifest fallbacks and change caution on content fallbacks to a note and reword --- epub33/core/index.html | 222 +++++++++++++++++++++-------------------- 1 file changed, 113 insertions(+), 109 deletions(-) diff --git a/epub33/core/index.html b/epub33/core/index.html index 8195f1135..e28750891 100644 --- a/epub33/core/index.html +++ b/epub33/core/index.html @@ -1176,62 +1176,9 @@

    Foreign Resources

    Refer to the [[HTML]] and [[SVG]] specifications for the intrinsic fallback capabilities their elements provide.

    +

    also provides additional information about how + fallbacks are interpreted for specific elements.

    - -

    The following sections provide additional clarifications about the intrinsic fallback - requirements of specific elements.

    - -
    -
    HTML audio Fallbacks
    - -

    EPUB Creators MUST NOT use embedded [[HTML]] flow content within the audio element as an intrinsic - fallback for Foreign Resources. Only child source elements [[HTML]] provide intrinsic fallback - capabilities.

    - -

    Only older Reading Systems that do not recognize the audio element (e.g., EPUB 2 - Reading Systems) will render the embedded content. When Reading Systems support the - audio element but not the available audio formats, they do not render the - embedded content for the user.

    - -
    -

    As video resources are Exempt Resources, this requirement does not apply to the - video element. EPUB Creators may also include flow content in the - video element for Reading Systems that do not support the element, - however.

    -
    -
    - -
    -
    HTML img Fallbacks
    - -

    Due to the variety of sources that EPUB Creators can - specify in the [[HTML]] img element, - the following fallback conditions apply to its use:

    - -
      -
    • -

      If it is the child of a picture - element:

      -
        -
      • it MUST reference Core Media Type Resources from its src and - srcset attributes, when EPUB Creators specify those attributes; - and
      • -
      • 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.
      • -
      -
    • - -
    • Otherwise, it MAY reference Foreign Resources in its src and - srcset attributes provided EPUB Creators define a manifest fallback.
    • -
    -
    @@ -1330,70 +1277,127 @@

    Exempt Resources

    Content Document, it automatically becomes exempt from fallbacks.

    -
    -
    Manifest Fallbacks
    +
    +

    Resource Fallbacks

    -
    -

    Reading System support for manifest fallbacks is poor and should not be relied upon to create - interoperable content. In most cases, if a Reading System does not support a format, it will - not use its fallback. This can lead to unexpected failures.

    -
    +
    +
    Manifest Fallbacks
    -

    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.

    +

    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.

    +

    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.

    -

    There are two cases for manifest fallbacks:

    +

    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 Creators MAY provide fallbacks for EPUB Content Documents (e.g., to provide a fallback for scripted content).

    -

    When a fallback chain includes more than one EPUB Content Document, EPUB Creators can use - the properties attribute to differentiate - the purpose of each.

    -
    +
    +
    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 Creators MAY provide fallbacks for EPUB Content Documents (e.g., to provide a fallback for scripted content).

    +

    When a fallback chain includes more than one EPUB Content Document, EPUB Creators can + use the properties attribute to + differentiate the purpose of each.

    +
    -
    Content Fallbacks
    -
    -
    -

    The purpose for keeping content fallbacks in EPUB 3 was primarily to continue to - provide a means of specifying 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.

    +
    Content Fallbacks
    +
    +
    +

    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.

    +
    +

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

    +
    +
    + +

    Regardless of the type of manifest fallback specified, fallback chains MUST NOT contain + self-references or circular references to item elements in the chain.

    + +
    +

    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.

    +
    +
    + +
    +

    Intrinsic Fallbacks

    + +

    The following sections provide additional clarifications about the intrinsic fallback + requirements of specific elements.

    + +
    +
    HTML audio Fallbacks
    + +

    EPUB Creators MUST NOT use embedded [[HTML]] flow content within the audio element as an intrinsic + fallback for Foreign Resources. Only child source elements [[HTML]] provide intrinsic fallback + capabilities.

    + +

    Only older Reading Systems that do not recognize the audio element (e.g., + EPUB 2 Reading Systems) will render the embedded content. When Reading Systems support + the audio element but not the available audio formats, they do not render + the embedded content for the user.

    + +
    +

    As video resources are Exempt Resources, this requirement does not apply to + the video element. EPUB Creators may also include flow content in the + video element for Reading Systems that do not support the element, + however.

    -

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

    - - +
    -

    Regardless of the type of manifest fallback specified, fallback chains MUST NOT contain - self-references or circular references to item elements in the chain.

    +
    +
    HTML img Fallbacks
    -
    -

    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.

    -
    -
    +

    Due to the variety of sources that EPUB Creators + can specify in the [[HTML]] img + element, the following fallback conditions apply to its use:

    +
      +
    • +

      If it is the child of a picture element:

      +
        +
      • it MUST reference Core Media Type Resources from its src and + srcset attributes, when EPUB Creators specify those + attributes; and
      • +
      • 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.
      • +
      +
    • + +
    • Otherwise, it MAY reference Foreign Resources in its src and + srcset attributes provided EPUB Creators define a manifest fallback.
    • +
    +
    +
    +

    Resource Locations

    From 072cb26337ab7e97e1ad9ea9b27065484e14a3dd Mon Sep 17 00:00:00 2001 From: Matt Garrish Date: Mon, 4 Apr 2022 13:47:14 -0300 Subject: [PATCH 5/5] reformat --- epub33/core/index.html | 312 ++++++++++++++++++++--------------------- 1 file changed, 155 insertions(+), 157 deletions(-) diff --git a/epub33/core/index.html b/epub33/core/index.html index c23531d62..647c4f300 100644 --- a/epub33/core/index.html +++ b/epub33/core/index.html @@ -836,14 +836,14 @@

    The Spine Plane

    render something for the user to read, as there is no guarantee of support for Foreign Content Documents.

    -

    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.

    +

    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.

    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 @@ -868,10 +868,10 @@

    The Spine Plane

    The Content Plane

    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.

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

    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 @@ -1164,12 +1164,12 @@

    Foreign Resources

    Refer to the [[HTML]] and [[SVG]] specifications for the intrinsic fallback capabilities their elements provide.

    -

    also provides additional information about how - fallbacks are interpreted for specific elements.

    +

    also provides additional information about how fallbacks + are interpreted for specific elements.

    -
    +

    Exempt Resources

    An Exempt Resource shares properties with both Foreign Resources and Core Media Type @@ -1265,126 +1265,124 @@

    Exempt Resources

    Resource Fallbacks

    -
    -
    Manifest Fallbacks
    +
    +
    Manifest Fallbacks
    -

    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.

    +

    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.

    +

    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.

    -

    There are two cases for manifest fallbacks:

    +

    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 Creators MAY provide fallbacks for EPUB Content Documents (e.g., to provide a fallback for scripted content).

    -

    When a fallback chain includes more than one EPUB Content Document, EPUB Creators can - use the properties attribute to - differentiate the purpose of each.

    -
    +
    +
    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 Creators MAY provide fallbacks for EPUB Content Documents (e.g., to provide a fallback for scripted content).

    +

    When a fallback chain includes more than one EPUB Content Document, EPUB Creators can use + the properties attribute to differentiate + the purpose of each.

    +
    -
    Content Fallbacks
    -
    -
    -

    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.

    -
    -

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

    -
    -
    +
    Content Fallbacks
    +
    +
    +

    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.

    +
    +

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

    +
    +
    -

    Regardless of the type of manifest fallback specified, fallback chains MUST NOT contain - self-references or circular references to item elements in the chain.

    +

    Regardless of the type of manifest fallback specified, fallback chains MUST NOT contain + self-references or circular references to item elements in the chain.

    -
    -

    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.

    -
    -
    +
    +

    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.

    +
    +
    -
    -

    Intrinsic Fallbacks

    +
    +

    Intrinsic Fallbacks

    -

    The following sections provide additional clarifications about the intrinsic fallback - requirements of specific elements.

    +

    The following sections provide additional clarifications about the intrinsic fallback + requirements of specific elements.

    -
    -
    HTML audio Fallbacks
    +
    +
    HTML audio Fallbacks
    -

    EPUB Creators MUST NOT use embedded [[HTML]] flow content within the audio element as an intrinsic - fallback for Foreign Resources. Only child source elements [[HTML]] provide intrinsic fallback - capabilities.

    +

    EPUB Creators MUST NOT use embedded [[HTML]] flow content within the audio element as an intrinsic + fallback for Foreign Resources. Only child source elements [[HTML]] provide intrinsic fallback + capabilities.

    -

    Only older Reading Systems that do not recognize the audio element (e.g., - EPUB 2 Reading Systems) will render the embedded content. When Reading Systems support - the audio element but not the available audio formats, they do not render - the embedded content for the user.

    +

    Only older Reading Systems that do not recognize the audio element (e.g., EPUB 2 + Reading Systems) will render the embedded content. When Reading Systems support the + audio element but not the available audio formats, they do not render the + embedded content for the user.

    -
    -

    As video resources are Exempt Resources, this requirement does not apply to - the video element. EPUB Creators may also include flow content in the - video element for Reading Systems that do not support the element, - however.

    -
    -
    +
    +

    As video resources are Exempt Resources, this requirement does not apply to the + video element. EPUB Creators may also include flow content in the + video element for Reading Systems that do not support the element, + however.

    +
    +
    -
    -
    HTML img Fallbacks
    +
    +
    HTML img Fallbacks
    -

    Due to the variety of sources that EPUB Creators - can specify in the [[HTML]] img - element, the following fallback conditions apply to its use:

    +

    Due to the variety of sources that EPUB Creators can + specify in the [[HTML]] img element, + the following fallback conditions apply to its use:

    -
      -
    • -

      If it is the child of a picture element:

      -
        -
      • it MUST reference Core Media Type Resources from its src and - srcset attributes, when EPUB Creators specify those - attributes; and
      • -
      • 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.
      • -
      -
    • +
        +
      • +

        If it is the child of a picture + element:

        +
          +
        • it MUST reference Core Media Type Resources from its src and + srcset attributes, when EPUB Creators specify those attributes; + and
        • +
        • 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.
        • +
        +
      • -
      • Otherwise, it MAY reference Foreign Resources in its src and - srcset attributes provided EPUB Creators define a manifest fallback.
      • -
      -
    +
  • Otherwise, it MAY reference Foreign Resources in its src and + srcset attributes provided EPUB Creators define a manifest fallback.
  • +
    -
    -

    Resource Locations

    +
    +
    +

    Resource Locations

    EPUB Creators MAY host the following types of Publication Resources outside the EPUB Container:

    @@ -3112,30 +3110,30 @@

    Introduction

    The following list summarizes the information found in the Package Document:

    -
      -
    • -

      Metadata — mechanisms to include and/or reference - information about the EPUB Publication.

      -
    • -
    • -

      A manifest — identifies via URL [[URL]], and describes - via MIME media type [[RFC4839]], the set of Publication Resources.

      -
    • -
    • -

      A spine — an ordered sequence of ID references to top-level - resources in the manifest from which Reading Systems can reach or utilize all other - resources in the set. The spine defines the default reading order.

      -
    • -
    • -

      Collections — a method of encapsulating and - identifying subcomponents within the Package.

      -
    • -
    • -

      Manifest fallback chains — a mechanism that defines an ordered list of top-level - resources as content equivalents. A Reading System can then choose between the resources - based on which it is capable of rendering.

      -
    • -
    +
      +
    • +

      Metadata — mechanisms to include and/or reference information + about the EPUB Publication.

      +
    • +
    • +

      A manifest — identifies via URL [[URL]], and describes via + MIME media type [[RFC4839]], the set of Publication Resources.

      +
    • +
    • +

      A spine — an ordered sequence of ID references to top-level + resources in the manifest from which Reading Systems can reach or utilize all other + resources in the set. The spine defines the default reading order.

      +
    • +
    • +

      Collections — a method of encapsulating and identifying + subcomponents within the Package.

      +
    • +
    • +

      Manifest fallback chains — a mechanism that defines an ordered list of top-level + resources as content equivalents. A Reading System can then choose between the resources + based on which it is capable of rendering.

      +
    • +

    An EPUB Publication can reference more than one Package Document, allowing for alternative @@ -3195,7 +3193,7 @@

    The dir Attribute

    … </package> - +

    Allowed on: collection, dc:contributor, dc:coverage, The item Element Resources, EPUB Creators MUST use the media type designated in .

    -

    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.

    +

    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.

    + +

    The fallback for one item MAY specify a fallback to another item, and + so on, creating a chain of fallback options. Refer to for + additional requirements related to the use of fallback chains.

    -

    The fallback for one item MAY specify a fallback to another item, - and so on, creating a chain of fallback options. Refer to for additional requirements related to the use of fallback chains.

    -

    The media-overlay attribute takes an IDREF [[XML]] that identifies the Media Overlay Document for the resource described by this item. Refer to for more information.

    @@ -5090,11 +5088,11 @@
    Examples
    </package> -