GithubHelp home page GithubHelp logo

Comments (5)

banux avatar banux commented on September 18, 2024

Hi,

Currently in the go streamer i parse the navigation document first and if i can't populate the TOC i try the NCX. So 1) and 3) i think try to merge the 2 documents will be difficult and not very useful.

from swift-toolkit.

llemeurfr avatar llemeurfr commented on September 18, 2024

I think that this process is good: 1) try the nav doc (EPUB3), and if it does not exist or contains no ToC 2) try the NCX (EPUB2).
This leaves some flexibility if an EPUB3 (by its declared version attribute) contains no nav doc (which is an authoring mistake).
Doing so also avoids mixing info that may be inconsistent between the nav doc and the ncx, e.g. page lists, landmarks ...
We should create a processing model document to describe such things clearly.

from swift-toolkit.

HadrienGardeur avatar HadrienGardeur commented on September 18, 2024

This should be documented on the main Readium-2 repo in a new document at the following place in the repo: https://github.com/readium/readium-2/tree/master/streamer/parser

from swift-toolkit.

HadrienGardeur avatar HadrienGardeur commented on September 18, 2024
// There is a reference to toc and a file name (in the href). That's not coherent?
  "landmarks" : [
    {
      "href" : "#toc",
      "title" : "Table of Contents"
    },
    {
      "href" : "p10.xhtml",
      "title" : "Begin Reading"
    }
  ],

We actually fixed self-referencing navigation documents in a recent commit: readium/go-toolkit#21

Here's an output from the live version of the Go streamer at https://readium2.feedbooks.net/Ym9va3MvbW9ieS1kaWNrLmVwdWI=/manifest.json

"landmarks": [
  {
   "href": "toc.xhtml#toc",
   "title": "Table of Contents"
  },
  {
   "href": "chapter_001.xhtml",
   "title": "Begin Reading"
  },
  {
   "href": "copyright.xhtml",
   "title": "Copyright Page"
  }
 ]

from swift-toolkit.

 avatar commented on September 18, 2024

Ok great, will update that on the streamer-swift too.

from swift-toolkit.

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.