That is not true in general. You can have a link in the ncx that uses a fragment that points to an "id" in an xhtml file that may not be used anyplace else in the xhtml.
To be safe, simply walk the ncx, collecting any links with fragments and add that fragment info to your used id list. You should probably do the same for the guide section of the opf to be 100% safe as well but fragment use in guide items is very rare.
|