Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielweck opened this issue Dec 9, 2014 · 1 comment

Comments

@danielweck
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants