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,

The problem is the setup of the target database document, with a sitemap and separate baseuri attributes for each book. That setup is for separate book PDF files trying to link to each other.

If you are processing the books as a single set element, you should instead set it up as a sequence of document elements without a sitemap and without @baseuri's, which should then form relative links.

<targetset>
ÂÂÂÂÂÂÂÂÂÂ <document targetdoc="test-set">
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &testsettargets;
ÂÂÂÂÂÂÂÂÂÂÂ </document>

ÂÂÂÂÂÂÂÂÂÂÂ <document targetdoc="dhs-book"
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &dhstargets;
ÂÂÂÂÂÂÂÂÂÂÂ </document>
Âetc.

I haven't tested this, but I think it will work. Let me know if it doesn't.

Bob


Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
On 8/2/2018 2:07 PM, Bob McIlvride wrote:

Hi Bob,

Â

Thank you for the quick reply.

> Do you use targetdoc attributes in your olink elements, and are they different for each book?Â

Yes, for example, this olink is located in the text of the book whose xml:id="dos-bookâ:

â (see <olink targetdoc="dhs-book" targetptr="dhs-book">DataHub Scripting</olink>), which â

The link renders like this in the PDF document output:

When I took the above screenshot (OlinkOutput.png, attached) the mouse was hovering over the text âDataHub Scriptingâ, as highlighted in yellow. You can see how the link seems to be looking for an external file.

> Is your target database document for PDF output set up as a single document, and do you generate a single target.db file for the set?

I believe so, but I could be mistaken. Below is a copy of the olinkdb.xml file. It references the target.db of each of the three books in the set (as I think it is supposed to) and creates a single target.db file for the set. The id of the output file is âtest-setâ, and the filename is test-set.pdf. It is located in the directory shown in the screenshot above. I donât know why the string âoxygen-main.htmlâ has been appended to the filename.

Â

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

<!DOCTYPE targetset [

<!ENTITY testsettargets SYSTEM "target.db">

<!ENTITY dhstargets SYSTEM "../DHScripting/target.db">

<!ENTITY dostargets SYSTEM "../DHODBCScripting/target.db">

<!ENTITY dwstargets SYSTEM "../DHWinScripting/target.db">]

>Â

Â

<targetset>

ÂÂÂ <targetsetinfo>Description</targetsetinfo>

ÂÂÂ <sitemap>

ÂÂÂÂÂÂÂ <dir name="./">

ÂÂÂÂÂÂÂÂÂÂÂ <document targetdoc="test-set"

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ baseuri="test-set.pdf">

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &testsettargets;

ÂÂÂÂÂÂÂÂÂÂÂ </document>

ÂÂÂÂÂÂÂÂÂÂÂ <document targetdoc="dhs-book"

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ baseuri="test-set.pdf">

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &dhstargets;

ÂÂÂÂÂÂÂÂÂÂÂ </document>

ÂÂÂÂÂÂÂÂÂÂÂ <document targetdoc="dos-book"

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ baseuri="test-set.pdf">

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &dhstargets;

ÂÂÂÂÂÂÂÂÂÂÂ </document>

ÂÂÂÂÂÂÂÂÂÂÂ <document targetdoc="dws-book"

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ baseuri="test-set.pdf">

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &dhstargets;

ÂÂÂÂÂÂÂÂÂÂÂ </document>

ÂÂÂÂÂÂÂ </dir>

ÂÂÂ </sitemap>

</targetset>

Â

I hope this helps clarify the situation a bit. If you need any additional information or files, please let me know.

Â

Best wishes,

Â

Bob

Â

COGENT

Bob McIlvride ÂÂ Communications Manager

Cogent Real-Time Systems Inc., a Skkynet company

T Â 1 905 702 7851 ext 103

cogent.ca

Â

From: Bob Stayton <bobs@sagehill.net>
Sent: Wednesday, August 01, 2018 6:29 PM
To: docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Can't get olink to generate a working link between books in a set

Â

Hi Bob,

I would need a little more clarity on your set up. Do you use targetdoc attributes in your olink elements, and are they different for each book?Â

Is your target database document for PDF output set up as a single document, and do you generate a single target.db file for the set?

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

On 8/1/2018 12:25 PM, Bob McIlvride wrote:

Dear friends,
Â
After almost two years being moved to other tasks, I now have an opportunity
to complete this project. The HTML output is working fine, but the issue
now is PDF (FO) output. Here's a summary of what we would like to do:
Â
We have several books that we can publish individually in HTML (actually
'webhelp' in oXygen) and in PDF outputs. Using the same source files, we
are publishing those same books in sets--HTML and PDF output.
Â
The challenge is that we would like to have active links between the books
when they are in a set, which become plain text references when the books
are published separately. We are using olinks to achieve this goal, and
they work fine for HTML output. 
Â
However, when we generate PDF output, it seems that the olinks are looking
for external documents, not for books within the set. Is there any way to
point the olinks back into the set document and have them work in the PDF
output as well?
Â
Any suggestions would be much appreciated.
Â
Best regards,
Â
Bob
Â
 
Bob McIlvrideÂÂÂ Communications Manager
Cogent Real-Time Systems Inc., a Skkynet company
TÂ 1 905 702 7851 ext 103
cogent.ca
Â
-----Original Message-----
From: Bob McIlvride <bob.mcilvride@cogent.ca> 
Sent: Monday, September 26, 2016 12:44 PM
To: 'Bob Stayton' <bobs@sagehill.net>; docbook-apps@lists.oasis-open.org
Subject: RE: [docbook-apps] Can't get olink to generate a working link
between books in a set
Â
Hi Bob,
Â
Thank you for pointing this out. It is working now, and I'm very grateful
for your help!
Â
Best wishes,
Â
Bob
 
Bob McIlvrideÂÂÂ Communications Manager
Cogent Real-Time Systems Inc., a Skkynet company TÂ 1 905 702 7851 ext 103
cogent.ca
Â
-----Original Message-----
From: Bob Stayton [mailto:bobs@sagehill.net]
Sent: Saturday, September 24, 2016 5:37 PM
To: Bob McIlvride <bob.mcilvride@skkynet.com>;
docbook-apps@lists.oasis-open.org
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
bobs@sagehill.net
Â
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" >
Â
%commonentities;
Â
]>
Â
<set xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
Â
ÂÂÂ xmlns:xlink="http://www.w3.org/1999/xlink"</a" xml:id="test-set">
Â
ÂÂÂ <info>
Â
ÂÂÂÂÂÂÂ <title>Test Set</title>
Â
ÂÂÂ </info>
Â
ÂÂÂ <xi:include href=""/>
Â
ÂÂÂ <xi:include href=""/>
Â
</set>
Â
Â
Â
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
message:
Â
Â
Â
[xslt] Error: unresolved olink: targetdoc/targetptr = 
'dos-book/dos-overview'.
Â
Â
Â
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"?>
Â
<targetset>
Â
ÂÂÂ <targetsetinfo> Description</targetsetinfo>
Â
ÂÂÂ <document targetdoc="srr-book.xml">
Â
ÂÂÂÂÂÂÂ <xi:include href=""
xmlns:xi="http://www.w3.org/2001/XInclude"/>
Â
ÂÂÂ </document>
Â
</targetset>
Â
Â
Â
- dos-book.xml:
Â
<?xml version="1.0" encoding="UTF-8"?>
Â
<targetset>
Â
ÂÂÂ <targetsetinfo> Description</targetsetinfo>
Â
ÂÂÂ <document targetdoc="dos-book.xml">
Â
ÂÂÂÂÂÂÂ <xi:include href=""
xmlns:xi="http://www.w3.org/2001/XInclude"/>
Â
ÂÂÂ </document>
Â
</targetset>
Â
Â
Â
- test-set.xml:
Â
<?xml version="1.0" encoding="UTF-8"?>
Â
<targetset>
Â
ÂÂÂ <targetsetinfo>A test of olink target sets.</targetsetinfo>
Â
ÂÂÂ <document targetdoc="../SRRModule/srr-book.xml">
Â
ÂÂÂÂÂÂÂ <xi:include href=""
xmlns:xi="http://www.w3.org/2001/XInclude"/>
Â
ÂÂÂ </document>
Â
ÂÂÂ <document targetdoc="../DHODBCScripting/dos-book.xml">
Â
ÂÂÂÂÂÂÂ <xi:include href=""
xmlns:xi="http://www.w3.org/2001/XInclude"/>
Â
ÂÂÂ </document>
Â
ÂÂÂ <document targetdoc="test-set.xml">
Â
ÂÂÂÂÂÂÂ <xi:include href=""
xmlns:xi="http://www.w3.org/2001/XInclude"/>
Â
ÂÂÂ </document>
Â
</targetset>
Â
Â
Â
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="" number="" 
targetptr="dos-book">
Â
ÂÂÂÂÂÂÂÂÂÂÂ <ttl>DataHub<sup
xmlns="http://www.w3.org/1999/xhtml">Â</sup> ODBC Scripting</ttl>
Â
ÂÂÂÂÂÂÂÂÂÂÂ <xreftext>DataHub<sup
xmlns="http://www.w3.org/1999/xhtml">Â</sup> ODBC Scripting</xreftext>
Â
ÂÂÂÂÂ ÂÂÂÂÂÂ<div element="chapter" href=""
number="1" targetptr="dos-introduction">
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <ttl>Introduction</ttl>
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <xreftext>Chapter 1, <em 
xmlns="http://www.w3.org/1999/xhtml"
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ >Introduction</em></xreftext>
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <div element="section"
href="" number="1.1"
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ targetptr="dos-overview">
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ÂÂ<ttl>Overview</ttl>
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <xreftext>Section 1.1, âOverviewâ</xreftext>
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </div>
Â
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ...
Â
Â
Â
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,
Â
Â
Â
Bob
Â
Â
Â
Â
Â
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/>
Â
Â
Â
Â
Â
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
Â
Â
Â
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
Â
Â
Â

Â



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org



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