View Single Post
Old 06-14-2022, 05:19 PM   #1
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 784
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Sage
What is "id=" For?

Sorry for this. It's been bothering me for a while, but, I just can't figure it out. What is an ID even for in an epub? According to things like:

https://www.w3.org/publishing/epub3/...tml#attrdef-id

it's a "shared attribute" and "The ID [XML] of the element, which MUST be unique within the document scope." So, I assumed it was just a name applied to part of the epub that could be referenced in other places to conveniently work with them.

But, for instance, right now, I'm looking at a book in the Editor and all the ID= elements are like:

<body id="BE6O0-76267ef1661c4ca4a716bfbfb65daab2" class="calibre7">
or
<p class="calibre8"><a id="c07" class="title"></a></p>

The body ones are understandable. They're for pointing at the chapters and are referenced in the text table of contents and in the toc.ncx file. But, AFAICS, the ids that follow after those body ones (they're simple strings looking like "c07" (which in this case stands for Chapter 7)) aren't referenced anywhere. They're not in the text table of contents, the toc.ncx file or anywhere else in the document except where they're first defined. What are they for? Are they just an artifact of Calibre's conversion process?

And, while I'm embarrassing myself here, what's with the <a ...></a> that hold those ids? I thought those were to reference http pages somewhere with an "href=".
enuddleyarbl is offline   Reply With Quote