
: How to find duplicate IDs in epub? Chapter_1.xhtml: <div id="ch1_sec1"> <h1 id="level1">Section 1</h1> <p id="p1">paragraph1, see <a href="Chapter_1.xhtml#f1">fig 1</a></p>
Chapter_1.xhtml:
<div id="ch1_sec1">
<h1 id="level1">Section 1</h1>
<p id="p1">paragraph1, see <a href="Chapter_1.xhtml#f1">fig 1</a></p>
<figure id="f1">
<caption>Fig. 1. Caption</caption>
</figure>
<p id="p2">paragraph2, see <a href="Chapter_1.xhtml#f1">fig 2</a></p>
<p id="p3">paragraph3</p>
</div>
Chapter_2.xhtml:
<div id="ch2_sec1">
<h1 id="level1">Section 1</h1>
<p id="p1">paragraph1</p>
<p id="p2">paragraph2, see <a href="Chapter_1.xhtml#f1">fig 2</a></p>
<figure id="f1">
<caption>Fig. 2. Caption</caption>
</figure>
<p id="p3">paragraph3</p>
</div>
Chapter_3.xhtml:
<div id="ch3_sec1">
<h1 id="level1">Section 1</h1>
<p id="p1">paragraph1</p>
<p id="p2">paragraph2</p>
<p id="p3">paragraph3</p>
</div>
In above mentioned source file, All the IDs are same except <div> ID.
In this case, how can i find the duplicates with different filenames (using perl, javascript or anything else).
If you have solution for this, please help.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @RJ

: Convert epub to kepub from command-line I’m trying to convert epubs to the kepub format, but would like to automate the process by doing it via CLI. So far, I had no luck in finding a

: How to hide/delete/ignore a specfic span type I am generating HTML output for ePub from LaTeX source. But, am having difficulty eliminating the "Chapter " at the start of each chapter.
3 Comments
Sorted by latest first Latest Oldest Best
Validate the ePUB using EPUB check 3.0.1 or if the file is less than 10 MB then you can validate the file using online ePUB validator (http://validator.idpf.org/). This will definitely help in identifying the duplicate ID’s.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
download link validator lithopssoft.com/hlv/
drag and drop the file into the validator and click validate button. error will show on screen.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
Your best bet is to validate with EPUBCheck. That will catch dupe @ids and other errors. I use a command in Linux similar to:
java -jar /home/epubcheck.jar book.epub -out errors.xml
The errors.xml file will give you filename, line numbers, and error descriptions.
Or you can use an online validator at IDPF if you don't mind uploading your work.
Free books android app tbrJar TBR JAR Read Free books online gutenberg