readium / go-toolkit

A toolkit for ebooks, audiobooks and comics written in Go

Home Page:https://readium.org/web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reference non-linear resources outside of the spine

HadrienGardeur opened this issue · comments

In EPUB, various spine items can be declared as non-linear.

As a concept, linearity is very vague and can be handled in a number of ways by reading systems, but most of them simply skip non-linear items.

To avoid this pitfall, the Web Publication Manifest and the in-memory model will not consider non-linear resources to be part of the spine.

This means that the parser should verify each <itemref> in the spine:
<itemref idref="c1-answerkey" linear="no"/>

If an <itemref> includes a linear attribute set to "no", the resource should be added to resources. Otherwise, the resource should be added to spine.

cc @danielweck