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] Can't get olink to generate a working link between books in a set

Hi Bob,
I think the problem is in the targetdoc attributes in your olinkdb.xml file. The targetdoc value in both a document's olink element and in the database document element is just an identifier name, not a filename. Those identifiers must match, and they will when you remove the ".xml" from the targetdoc value in the database file.

There is a good reason why targetdoc is not a filename, and that is because filenames can be changed without having to rewrite dozens of olinks embedded in files.

Bob Stayton
Sagehill Enterprises

On 9/23/2016 11:36 AM, Bob McIlvride wrote:
Dear friends,

I am having problems getting olinks to correctly generate links between
books in a set in HTML output.  I want to be able to output independent
books that contain references to content in other books, and when the
books are produced as part of a set, these references should become
links in HTML output.

I am using oXygen XML Editor 18.0 that uses Saxon to generate HTML
output.  I've set up project files for two books (srr-book.xml and
dos-book.xml) and one set (test-set.xml) as a test.  I have inserted one
olink in the srr-book that points to a section in the dos-book.

The test-set.xml document looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE set [

<!ENTITY % commonentities SYSTEM "../../Source/Common/commonentities.ent" >



<set xmlns="http://docbook.org/ns/docbook"; version="5.0"

    xmlns:xlink="http://www.w3.org/1999/xlink"; xml:id="test-set">


        <title>Test Set</title>


    <xi:include href="../SRRModule/srr-book.xml"/>

    <xi:include href="../DHODBCScripting/dos-book.xml"/>


The olink markup in the srr-book.xml document looks like this:

<para>Not to be confused with <olink targetdoc="dos-book"
targetptr="dos-overview">Overview Link</olink>,which is something
altogether different.</para>

When the test-set.xml document is processed, oXygen gives this error

[xslt] Error: unresolved olink: targetdoc/targetptr =

And the HTML output where the link should be looks like this:

<p>Not to be confused with <span class="olink">Overview Link</span>,
which is something altogether different.</p>

The olinkdb.xml files for the books and the set are as follows:

- srr-book.xml:

<?xml version="1.0" encoding="UTF-8"?>


    <targetsetinfo> Description</targetsetinfo>

    <document targetdoc="srr-book.xml">

        <xi:include href="target.db"



- dos-book.xml:

<?xml version="1.0" encoding="UTF-8"?>


    <targetsetinfo> Description</targetsetinfo>

    <document targetdoc="dos-book.xml">

        <xi:include href="target.db"



- test-set.xml:

<?xml version="1.0" encoding="UTF-8"?>


    <targetsetinfo>A test of olink target sets.</targetsetinfo>

    <document targetdoc="../SRRModule/srr-book.xml">

        <xi:include href="../SRRModule/target.db"


    <document targetdoc="../DHODBCScripting/dos-book.xml">

        <xi:include href="../DHODBCScripting/target.db"


    <document targetdoc="test-set.xml">

        <xi:include href="target.db"



The target.db content that results from these olinkdb.xml files looks
correct. For example, here is the part that corresponds to the dos-book
that refers to the Overview section to which the olink points:

<div element="book" href="dos-book.html" number="" targetptr="dos-book">

xmlns="http://www.w3.org/1999/xhtml";>®</sup> ODBC Scripting</ttl>

xmlns="http://www.w3.org/1999/xhtml";>®</sup> ODBC Scripting</xreftext>

            <div element="chapter" href="dos-introduction.html"
number="1" targetptr="dos-introduction">


                  <xreftext>Chapter 1, <em


                  <div element="section"
href="dos-introduction.html#dos-overview" number="1.1"



                        <xreftext>Section 1.1, “Overview”</xreftext>



I think I am doing everything correctly and according to Bob Stayton's
clear and well-written documentation, but apparently I have missed
something.  Can anyone see what I may be doing wrong?

Appreciatively yours,


COGENT <http://cogent.ca/>


*Bob McIlvride **   Communications Manager*

Cogent Real-Time Systems Inc., a Skkynet company

T   1 905 702 7851 ext 103

cogent.ca <http://cogent.ca/>

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