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?


Sorry to spam this thread, but I just ran the tool chain manually and it's fine. Must be something to do with the way I have automated it with maven.

Nat 


On Thu, Jan 16, 2014 at 3:05 PM, natk <nkershaw@gmail.com> wrote:
One thing I just noticed is that it looks like it is trying to open the target database from the stylesheet jar. I've not seen this error before and I've pretty much reverted all of the other changes:

Failure reading jar:file:/path/to/maven/repo/net/sf/docbook/docbook-xsl/1.76.1/docbook-xsl-1.76.1-ns-resources.zip!/full/path/to/target/database: JAR entry full/path/to/target/database not found in /path/to/maven/repo/net/sf/docbook/docbook-xsl/1.76.1/docbook-xsl-1.76.1-ns-resources.zip

I'm not sure why it is trying to read the target database from the stylesheet resources jar, and what has changed to make this happen.

Nat 



On Thu, Jan 16, 2014 at 1:10 PM, natk <nkershaw@gmail.com> wrote:
Thanks for the prompt reply.

I do not get the earlier error, so it looks like it is a problem with parsing. I have recently added some new olinks, so I guess the problem is with those. I will have a closer look at them. Any hints for debugging here?

Nat


On Thu, Jan 16, 2014 at 12:18 PM, natk <nkershaw@gmail.com> wrote:
Which brings me to ask, why am I getting that error? I get the following trace with olink.debug switched on:

Olink error: could not open target database '/Absolute/path/to/file'
Olink debug: root element of target.database is 'stylesheet'.
Olink debug: cases for targetdoc='TargetDoc' and targetptr='anchor' in language 'en'.
Olink debug: CaseA NOT matched
Olink debug: No case matched for lang 'en'.
Olink debug: cases for targetdoc='TargetDoc' and targetptr='anchor' in language ''.
Olink debug: CaseA NOT matched
Olink debug: No case matched for lang ''.
Error: unresolved olink: targetdoc/targetptr = 'TargetDoc/anchor'.

If I try and list my target database file then it is present on the file system.

Do the stylesheets give this error when they can't find the file (which should not be happening), or if they cannot parse the file. If it is the second case, how do I determine what the error is?)

Nat


On Thu, Jan 16, 2014 at 9:18 AM, natk <nkershaw@gmail.com> wrote:
Ok, thanks for that, I am getting processing errors (Olink error: could not open target database) and I thought this might be the reason. It doesn't sound like it though.

Nat 




On Thu, Jan 16, 2014 at 6:53 AM, Bob Stayton <bobs@sagehill.net> wrote:
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="">       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]