OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Questions about IDs defined on some Docbook elements

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 

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:


If you want to customize your cross reference, here are other links:


> 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.

  Thomas Schraitle

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]