On 6/2/22 22:58, Eric Isaacson wrote:
I’m trying to find information on how to add some sort of ID to
my DocBook files that will result in a named destination in the
generated PDF.
We are using XMLmind 10 to create the DocBook files and PDFs.
Difficult to help you as I don't know what is a "named destination in a
PDF file".
Let's just say that it's a good practice to add meaningful "xml:id"
attributes ("id" attributes in DocBook v4 documents) to your chapters,
sections, figures, tables.
IMPORTANT: the "xml:id" must be added to the element itself and NOT to
its title:
Good:
----
<chapter xml:id="conclusion">
<title>Conclusion</title>
----
Bad:
----
<chapter>
<title xml:id="conclusion">Conclusion</title>
----
If you want to mark locations in your DocBook document which are not
formal elements like chapters, sections, figures, tables, etc, then
please use the <anchor> element. This <anchor> element has a mandatory
"xml:id" attribute. See https://tdg.docbook.org/tdg/5.1/anchor.html
When converting DocBook to PDF, these DocBook IDs are first converted to
XSL-FO "id" attributes (XSL-FO is a standard intermediate format), then
the XSL-FO processor which will generate the PDF (e.g. FOP) is supposed
to make good use of these XSL-FO IDs.
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support