Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.
This repository was archived by the owner on May 6, 2025. It is now read-only.

EPUB3 bindings uses default "epub3://" URI scheme, does not correctly fetch XHTML handler from EPUB archive? #137

Open
@danielweck

Description

@danielweck

See original discussion:
https://groups.google.com/d/msg/readium-dev/1RUBYB9jHxU/QgWXkwmq45MJ

Test EPUB:
https://code.google.com/p/epub-samples/downloads/detail?name=widget-figure-gallery-20121022.epub

<item id="moon-phases-xml"
href="moon-phases.xml"
media-type="application/x-epub-figure-gallery"/>

<bindings>
<mediaType handler="figure-gallery-impl"
media-type="application/x-epub-figure-gallery"/>
</bindings>

<item id="figure-gallery-impl"
href="figure-gallery-widget/figure-gallery-impl.xhtml"
   media-type="application/xhtml+xml"
   properties="scripted"/>

Code references:
https://github.com/readium/readium-sdk/blob/develop/ePub3/ePub/object_preprocessor.cpp
https://github.com/readium/readium-sdk/blob/develop/ePub3/ePub/content_handler.h

The epub3:// URI scheme comes from here:
https://github.com/readium/readium-sdk/blob/develop/ePub3/utilities/iri.cpp#L34

...and set to the iframe here:
https://github.com/readium/readium-sdk/blob/develop/ePub3/ePub/object_preprocessor.cpp#L160

This appears to be incorrect: the iframe should only receive an src attribute containing a relative reference to the provided XHTML content handler (including its query parameters). Right now, the src is an absolute URI using the epub3:// scheme / protocol, that does not resolve to anything:

epub3://code.google.com.epub-samples.widget-figure-gallery/EPUB/figure-gallery-widget/figure-gallery-impl.xhtml?src=moon-phases.xml&type=application%2Fx-epub-figure-gallery

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions