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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] can an anchor be a target for an olink?


Hi Nat,
olinks to anchor elements should work to form a link, the question is what text will it generate. An anchor element does not have a title (it is defined as an empty element), so I'm not surprised the <ttl> element is empty. The link text will be the content of the xreftext element in the database, which, for lack of any other text, falls back to the ancestor section title. You should be able to override that by adding an xreflabel attribute to the anchor element.

The <ttl> element and @number attributes in the olink database are only used when an olink has an @xrefstyle attribute to select specific components like title or label.

--
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

On 1/14/2014 11:39 PM, natk wrote:
I am generating an olink db from a docbook file which contains anchors.

e.g.

<section id="id1">
   <title>Title</title>
   <table border="1">
...
     <tbody>
     <tr>
        <td><anchor id="id2"/>Text</td>
....

The olinkdb file getting generated from this does not produce a title:

<obj element="anchor"
      href="File.html#id2"
      number="" targetptr="id2">
      <ttl>???TITLE???</ttl>
      <xreftext>Section 1.1.3, “Section Title”</xreftext>
</obj>

Are anchors allowed as targets for olinks? If so, what do I need to change?

I am using the maven-docbkx-plugin with version 1.76.1 of the stylesheets.

Nat






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