Does CFI work for non-first package documents within an EPUB zip file?

17 views
Skip to first unread message

MURATA Makoto

unread,
May 21, 2012, 8:33:20 AM5/21/12
to epub-work...@googlegroups.com
Dear colleagues,

The first sentence in 3.1 of EPUB CFI is

The process of resolving an EPUB CFI to a location within an
Publication begins
with the root package element of the Package Document. Each step in the CFI
is then processed one by one, left to right, applying the rules
defined in the following subsections.

However, there appear to be no mechanisms for locating non-first root
package documents
in a given EPUB zip file. Am I mistaken?

Regards,
Makoto

Daniel Weck

unread,
May 21, 2012, 9:07:28 AM5/21/12
to epub-work...@googlegroups.com
Hi, I imagine that you are referring to the 'rootfile' element in "META-INF/container.xml":

<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
<rootfiles>
<rootfile full-path="EPUB/package.opf" media-type="application/oebps-package+xml"/>
</rootfiles>
</container>

...as per the specification:

"
The Package Document traversed by the CFI must be the one specified as the default rendition in the Publication's META-INF/container.xml file (i.e., the Package Document referenced by the first rootfile element in container.xml).
"

It is my understanding is that only *intra-publication* CFIs allow linking to OPF files other than the "root" one:

http://idpf.org/epub/linking/cfi/epub-cfi.html#sec-intra-cfis

e.g.:

href="../package.opf#epubcfi(...)"

So, with a publication-level EPUB CFI, it is only possible to link into the root OPF, e.g.:

href="book.epub#epubcfi(...)"

Regards, Dan

Peter Sorotokin

unread,
May 21, 2012, 12:53:56 PM5/21/12
to epub-work...@googlegroups.com
No.

If that is allowed, we would lose "canonical" part: it would be possible
to point to the same place in the book using two different CFIs and we
would not be able to compare two CFIs. Pointing to non-first rendition may
be a good functionality to have, it just should not be done with CFI.

If we define an interoperable way to select a rendition, Reading Systems
would have to implement some way to translate position between renditions
no matter what (even if there is some way to point to non-first
rendition). Reading System should translate a position to the first
rendition before calculating CFI.

Peter
Reply all
Reply to author
Forward
0 new messages