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.
<a href="Chapter_1.xhtml#f1">Fig. 1.</a>
and<a href="Chapter_1.xhtml#f1">Fig. 2.</a>
. because the script is finding and linking with first id with different content. – mr.apandu Sep 18 '15 at 4:23