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 database has incorrect href

Hi Denis,
Your command line shows that you are using the docbook.xsl stylesheet
(non-chunking), rather than chunk.html.  The non-chunking stylesheet writes
to standard output, which means the stylesheet doesn't know the name of the
output file for the document.  The only information it has is the fragment.
So that output is correct.

In order for you to olink to such documents you have to supply the name of
the file in one of two ways. You can add a baseuri attribute to that
<document> element in the olink database framework (the master file that
includes all the separate document data files).  The baseuri will be
prepended to the href value to form the link.  See callout #10 in Example
23.1 in this section of my book:


If you want the filename to be more flexible, you can get it added to each
href.  When you process to generate the olink data for that document, set
the olink.base.uri parameter to its HTML output filename:


This will be handled like the baseuri attribute and prepended to each href
value, but this time it will appear so in the target data set as it is
generated.  Don't use both methods, unless you want both prepended (baseuri
could be used for a directory path, for example).

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Denis Bradford" <denis.bradford@verizon.net>
To: <docbook-apps@lists.oasis-open.org>
Sent: Sunday, January 01, 2006 9:00 AM
Subject: [docbook-apps] olink database has incorrect href

> I'm generating olink databases with the wrong href attribute
> (#frag instead of file.html). Can anyone suggest why?
> For simplicity, here are the pieces I used to test an olink to the
> current document - olinks to other docs have the same problem.
> ==================================
> testindex.xml (excerpt of source document showing test olink)
> -------------
> <chapter id="home">
>    <title>Chapter Title</title>
>    <para>Test olink: <olink targetdoc="testindex"
> targetptr="home">Home</olink>  </para>
> ==================================
> olink build (java paths removed)
> --------------------------------
> java -cp
> -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Document
> -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFacto
> -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=
>         org.apache.xerces.parsers.XIncludeParserConfiguration
> com.icl.saxon.StyleSheet
> -r org.apache.xml.resolver.tools.CatalogResolver
> -x org.apache.xml.resolver.tools.ResolvingXMLReader
> docbook.xsl
> collect.xref.targets=only
> current.docid=home
> targets.filename=olink.testindex.xml
> ==================================
> olink.testindex.xml (generated from stuff above)
> ------------------------------------------------
> <div element="chapter" href="#home" number="1" targetptr="home"> ...
> P.S. running java 1.5, docbook 4.4, docbookxsl 1.69.1
> ---------------------------------------------------------------------
> 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]