Giter Site home page Giter Site logo

Comments (3)

danielweck avatar danielweck commented on June 16, 2024

The expectation is clear with the test that has a specific XML content type:

<manifest>
<item id="content_primary" fallback="content_fallback" href="moby.xml" media-type="application/dtc+xml" />
<item id="content_fallback" href="content_001.xhtml" media-type="application/xhtml+xml" />
<item id="nav" properties="nav" href="nav.xhtml" media-type="application/xhtml+xml" />
</manifest>
<spine>
<itemref idref="content_primary" />
</spine>

... but conversely the "plain" application/xml test is problematic because XHTML itself is XML, so the description of the expected outcome needs to be clarified:

<manifest>
<item id="content_primary" fallback="content_fallback" href="moby.xml" media-type="application/xml" />
<item id="content_fallback" href="content_001.xhtml" media-type="application/xhtml+xml" />
<item id="nav" properties="nav" href="nav.xhtml" media-type="application/xhtml+xml" />
</manifest>
<spine>
<itemref idref="content_primary" />
</spine>

More specifically:

If the reading system does not support XML, it should display the HTML.

<dc:description>
This EPUB uses an ordinary XML content file with mimetype application/xml in the spine, with a manifest fallback to an
HTML document. If the reading system does not support XML, it should display the HTML.
</dc:description>

from epub-tests.

danielweck avatar danielweck commented on June 16, 2024

Similarly with the JSON test, I struggle to understand the criteria for fail vs. pass:

<manifest>
<item id="content_primary" fallback="content_fallback" href="moby.json" media-type="application/json" />
<item id="content_fallback" href="content_001.xhtml" media-type="application/xhtml+xml" />
<item id="nav" properties="nav" href="nav.xhtml" media-type="application/xhtml+xml" />
</manifest>
<spine>
<itemref idref="content_primary" />
</spine>

Let's say my reading system claims to support application/json by displaying its raw contents in the publication viewport, thereby ignoring the fallback XHTML. Is that a pass? In the absence of clear content processing model for JSON, it's hard to assert success.

(Naturally, in the real world I would expect most reading systems to follow the fallback chain to XHTML, but that's beside the point)

from epub-tests.

gautierchomel avatar gautierchomel commented on June 16, 2024

see related discussion #245

Regarding pub-foreign_bad-fallback what happens is that Thorium open system dialog and ask where to save the file. I find it's a useful feature :)

I consider it "n/a" (no fallback is needed as access to the file is provided).

Same for pub-foreign_json-spine and pub-foreign_xml-spine

from epub-tests.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.