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] Website: Problem using olinks across websites


Hi Denis,
A couple of items may fix 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>

It seems you are missing a sitemap element in your olinkdatabase.

> 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>

The first is recommended when referencing a page within a single website. 
The second is for referencing outside of website to another document (in 
this case, another website).  The targetdoc values are an olink feature that 
exists outside of any document id attributes.  All that needs to match is a 
targetdoc value in an olink to a targetdoc value in a <document> element in 
a database.

The second example is correct and does find the data, as you noticed, but 
gives the wrong URI.  I think adding the sitemap should fix the path 
problem.

One thing I'm not clear about is your website.database.xml file.  It seems 
to have a document element with targetdoc attribute.  But then you put that 
inside another document element with different targetdoc in olinkdatabase. 
The document element should not be nested.  Normally the target data for a 
document generated by the stylesheet does not have a document element.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Denis Bradford" <denis.bradford@verizon.net>
To: <docbook-apps@lists.oasis-open.org>
Sent: Monday, March 31, 2008 8:29 PM
Subject: [docbook-apps] Website: Problem using olinks across websites


>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: 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]