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>
  <dir name="build">
    <document  targetdoc="homeSite">
      <xi:include href="website.database.xml" />
    </document>
    <dir name="schedule">
      <document  targetdoc="scheduleSite">
        <xi:include href="schedule/website.database.xml" />
      </document>
    </dir>
      ...
</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:

  <a href="../#about" class="olink">About this site</a>

fwiw, here's the corresponding code in the website database:

   <document targetdoc="about" baseuri="about.html">
<div element="webpage" href="#about" number="" targetptr="about" 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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to