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] olink basics

Hi Steve,

I think perhaps my book should provide more details of some basic use cases to make 
the setup for olinks easier.  In this case the setup of your olinkdb.xml file needs to 
be completed.

I see that you declare  a system entity for the file SDKOverview.db, but it is not 
referenced.  As a result, both of the <document> elements in the database have no 
content.  So although the targetdoc value "SDKEnumeration" is found in the database, 
it has no targetptr values and their data associated with it.

Also, I notice that the target data file SDKOverview.db is not generated.  The name of 
the data file is established in the stylesheet parameter 'targets.filename', which is 
set to 'target.db' by default (you should see that in the directory).  If you want the 
file to be named otherwise, then set the parameter.

If I understand correctly, you have a single assembled document, so you don't need 
more than one <document> element in the database.  This version of olinkdb.xml should 
work for your purposes:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE targetset
SYSTEM "targetdatabase.dtd" [
<!ENTITY SDKOverview SYSTEM "SDKOverview.db">
  <document targetdoc="SDKEnumeration">

And this set of params will make it work for olinks whose targetdoc="SDKEnumeration":

xsltproc --output c:\<filename> /
--stringparam collect.xref.targets "yes" /
--stringparam targets.filename SDKOverview.db /
--stringparam target.database.document "olinkdb.xml" /
--xinclude C:\<our-custom-xsl> C:\<book-file>

Since you have only one document, you don't need to set the 'current.docid' parameter. 
That value is used to compute a path between two different output documents.

Hope this helps.  Your comments have prompted me to try to improve the chapter on 
olinking to make it easier to get started.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Steve Johnson" <stevej@caringo.com>
To: "Docbook Apps Help list" <docbook-apps@lists.oasis-open.org>
Sent: Monday, July 05, 2010 11:59 AM
Subject: [docbook-apps] olink basics

> Currently we are not "chunking" documentation but at some point I would like to be
> able to do that. To that end, because currently there are no cross-references at
> all, I want to implement cross-references so they will work whether or not the
> documents are "chunked" at transformation.
> I had no luck with <olink> because when I did the transform I always got a failure
> to resolve the olinks.
> To start with I wanted to olink between two chapters in a book. I added an xml:id to
> each <chapter> tag and, because all chapter files are in the same directory, used
> the following as the olink.db:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE targetset
> SYSTEM "targetdatabase.dtd" [
> <!ENTITY SDKOverview SYSTEM "SDKOverview.db">
> ]>
> <targetset>
>              <document targetdoc="SDKIntroduction"
>                   baseuri="CAStorSDKOverview.html">
>              </document>
>               <document targetdoc="SDKEnumeration">
>               </document>
> </targetset>
> Question: Does the name of "baseuri" have to correspond to anything? Should it
> correspond to the name of the chapter (SDKIntroduction) or to the book
> (CAStorSDKOverview)?
> Link: <olink targetdoc="SDKEnumeration" targetptr="StartMethod"/>
> Transform command line:
> xsltproc --output c:\<filename> /
> --stringparam collect.xref.targets "yes" /
> --stringparam target.database.document "olinkdb.xml" /
> --stringparam current.docid "CAStorSDKOverview" /
> --xinclude C:\<our-custom-xsl> C:\<book-file>
> Result:
> Writing target.db for book(CAStorSDKOverview)
> Error: unresolved olink: targetdoc/targetptr = 'SDKEnumeration/StartMethod'.
> -- 
> ------------
> Steve Johnson, Senior Content Developer
> Caringo
> stevej@caringo.com
> ---------------------------------------------------------------------
> 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]