View Single Post
Old 02-26-2018, 04:32 PM   #366
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,746
Karma: 24032915
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Instead they remove the entire content.opf and its spine redirection nonsense and just tell you which file to use. Effectively, they remove everything up to and including the first ! point of the epubcfi and just provide the node path after the proper file has been identified.
I still don't fully understand the epubcfi format. For example, for a test epub3 book that I created ACE reported the following non-standard epubcfi:

Code:
Text/Section0001.xhtml#epubcfi(/4/4)
The actual Section0001.xhtml HTML code is:
Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
  <title></title>
  <link href="../Styles/style.css" type="text/css" rel="stylesheet"/>
</head>

<body>
  <h1>Test 1</h1>

  <p epub:type="dedication">This is a dedication.</p>

  <p>This is a normal paragraph.</p>

  <p epub:type="notice">This is a notice.</p>
</body>
</html>


Assuming that Section0001.xhtml is the second spine entry, how would I need to reformat the above non-standard ACE epubcfi for use with your code?

The actual spine looks like this:
Spoiler:
Code:
  <spine toc="ncx">
    <itemref idref="nav.xhtml" linear="no"/>
    <itemref idref="Section0001.xhtml"/>
    <itemref idref="Section0002.xhtml"/>
  </spine>
Doitsu is offline   Reply With Quote