Discussion:
Olinking to section does not provide section number
Erik Rask
2014-09-22 10:13:43 UTC
Permalink
When I use an olink to a chapter, I get the labelnumber element correctly represented. When I olink to a section, I do not, and I get the message "Request for label of unexpected element: olink". I've tried setting the xrefstyle with both "template:%n %t" and "select:labelnumber title" to no avail.

Is there a parameter I'm missing here, or is xsltproc not able to deduce labelnumber from section?

BR
Erik Rask
--
Technical Communication Team Lead
Procera Networks
Erik Rask
2014-09-22 11:39:06 UTC
Permalink
I actually solved it myself, sorry to have disturbed. The solution,
if anyone has run into the same issue, is below.

----- Original Message -----
Post by Erik Rask
When I use an olink to a chapter, I get the labelnumber element correctly
represented. When I olink to a section, I do not, and I get the message
"Request for label of unexpected element: olink". I've tried setting the
xrefstyle with both "template:%n %t" and "select:labelnumber title" to no
avail.
Is there a parameter I'm missing here, or is xsltproc not able to deduce
labelnumber from section?
Turns out that I was using the stock XSL to collect xrefs and write the target db file,
since I had that copy pasted from http://www.sagehill.net/docbookxsl/Olinking.html,
but I use a customization layer to write output, which has section.autolabel set to 1.

Using the customization layer also for the xref collection/targetdb writing step fixed it.

BR /Erik

Loading...