I maintain a web site as a collection of DocBook websites, each with its
own layout and its own TOC. I want to replace the old ulinks with
olinks. The olinks are working fine within each website, but olinks
across websites fail to resolve. Here's how TDG says to do it:
"Once you have the targets database, you can pass its pathname to the
XSLT processor using the target.database.document stylesheet parameter.
This database is in addition to (and separate from) the olink database
that resolves olinks between webpages in your website. The database of
internal olinks is identified with the website.database.document
parameter. When the processor encounters an olink, it first checks the
website database before consulting the offsite database."
All right, here's how I've been trying to implement it:
1. In my ant script, after building the layouts, I transform each
website in turn. In addition to setting collect.xref.targets='yes' and
declaring the current docid, I specify both the website.database and
target.database documents, like this:
<target name="doWebsite.home">
<java ...
<arg line="collect.xref.targets='yes'" />
<arg line="current.docid='homeSite'" />
<arg line="target.database.document='olinksitemap'"/>
<arg line="website.database.document='website.database.xml'" />
</java>
</target>
It seems the
2. Meanwhile, I've created olinksitemap by hand. It includes the
website.database.document for each website, like this:
<targetset>
<document targetdoc="homeSite">
<xi:include href="website.database.xml" />
</document>
<document targetdoc="scheduleSite">
<xi:include href="schedule/website.database.xml" />
</document>
...
</targetset>
3. Finally, the olinks themselves. I've tried a couple of forms. For
example, here's an olink to a homeSite page from within a scheduleSite
page:
<olink targetdoc="about" targetptr="about"/>
<olink targetdoc="homeSite" targetptr="about"/>
The first is the recommended form where 'about' is the id of the
webpage. It does not resolve at all. The second is the conventional
(non-website) form, but seems doomed because there is no book or any
document with the id "homeSite". Encouragingly, it finds the title - but
alas, the wrong url:
About this site
fwiw, here's the corresponding code in the website database:
<document targetdoc="about" baseuri="about.html">
lang="en">
<ttl>About this site</ttl>
Am I anywhere near the right track, or completely off? Any working
examples of cross-website olinks?
TIA,
Denis