Hi Radu,
Am Donnerstag, 3. Oktober 2013, 14:29:41 schrieb Radu Coravu:
> Let's say in a Docbook 5 document I have a chapter title someplace
> like this:
> > <title xml:id="titleChapter">3 - Chapter Title - Missing ID</title>
I cannot recommend that. Better place the xml:id on your parent chapter
element.
Another problem with your title: don't include any numbers (like "3", "Chapter
3" etc.) as the number and the "Chapter" text are generated automatically.
> and in some other place of the document I use a link to it:
> > <link xlink:href="#titlePart">titlePart</link>
Is there a reason why you don't use <xref linkend="..."/>? :)
In almost all cases, <xref/> is the right element to create links (or better,
cross references). Just invent an ID, insert it into xml:id and the linkend
attributes, and the DocBook stylesheets do the rest. Pretty simple.
Maybe it helps, if you get familiar with the differences between cross
references and links:
http://doccookbook.sf.net/html/en/dbc.markup.xref-vs-link.html
If you want to customize your cross reference, here are other links:
http://doccookbook.sf.net/html/en/dbc.markup.xref.html
http://www.sagehill.net/docbookxsl/CustomXrefs.html
> From what I tested the XHTML-based outputs will never create an anchor
> for the "titleChapter" ID.
I haven't tested it. Perhaps it has something to do with your misplaced
xml:id. Try it as suggested above and see what happens.
> [...]
Hope this helps.
--
Gruß/Regards
Thomas Schraitle