docbook-apps message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: olink nightmare
- From: tom.kirkpatrick@virusbtn.com
- To: docbook-apps@lists.oasis-open.org
- Date: Mon, 19 Sep 2005 14:04:33 +0100
I'm having some real trouble getting
olinks to process correctly. I have followed the example as per sagehill.net.
The only thing which is different in my setup is my method of applying
the stylesheets. I am using Apache::AxKit (a dynamic XSL transformation
pipeline similar to Apache:: Cocoon). Please could someone enlighten me
as to what I'm doing wrong...
## book.dkb ######
<?xml version="1.0" encoding="UTF-8"?>
<book id="book">
<title>Comand Reference</title>
<reference>
<title>Commands</title>
<xi:include
href=""cmd1.dkb"" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include
href=""cmd2.dkb"" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</reference>
</book>
###########
## cmd1.dkb ######
<?xml version="1.0" encoding="UTF-8"?>
<refentry id="cmd1">
<refnamediv>
<refname>cmd1</refname>
<refpurpose>starts
the client</refpurpose>
</refnamediv>
<refsection>
<title>cmd2
ref section</title>
<para>Test
olink: refer to the <olink targetdoc="book" targetptr="synop"></olink>
section of the command 2 page</para>
</refsection>
</refentry>
###########
## cmd2.dkb ######
<?xml version="1.0" encoding="UTF-8"?>
<refentry id="cmd2">
<refnamediv>
<refname>cmd2</refname>
<refpurpose>determines
compiler flags</refpurpose>
</refnamediv>
<refsection id="synop">
<title>SYNOPSIS</title>
<cmdsynopsis>
<command>sb-config</command>
<arg rep="norepeat"><replaceable>option</replaceable></arg>
</cmdsynopsis>
</refsection>
</refentry>
###########
## testdb.xml ######
<?xml version="1.0" encoding="utf-8"?>
<targetset>
<targetsetinfo>Virus
Bulletin article archive site map</targetsetinfo>
<sitemap>
<dir name="../testolink">
<document
targetdoc="book">
<xi:include
href=""target.db"" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</document>
</dir>
</sitemap>
</targetset>
###########
## My stylesheet customisation layer
######
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href=""../docbook-xsl-1.69.1/xhtml/docbook.xsl"/>
<xsl:param name="collect.xref.targets">yes</xsl:param>
<xsl:param name="olink.debug">1</xsl:param>
<xsl:param name="olink.base.uri"><xsl:value-of
select="/*/@id"/>.dkb</xsl:param>
<xsl:param name="target.database.document">testdb.xml</xsl:param>
<xsl:param name="targets.filename"><xsl:value-of
select="/*/@id"/>_target.db</xsl:param>
<xsl:param name="current.docid"><xsl:value-of
select="/*/@id"/></xsl:param>
</xsl:stylesheet>
###########
When requesting /testolink/book.dkb
in my browser, AxKit applies the above stylesheet to the book.dkb file.
which results in the following file being created in the /testlink directory:
## The target database file that gets
created
<div element="book" href=""book.dkb#book""
number="" targetptr="book">
<ttl>Comand Reference</ttl>
<xreftext>Comand Reference</xreftext>
<div element="reference"
href=""book.dkb#id2513437"" number="I">
<ttl>Commands</ttl>
<xreftext>Commands</xreftext>
<div element="refentry"
href=""book.dkb#cmd1"" number="" targetptr="cmd1">
<ttl>cmd1</ttl>
<xreftext>cmd1</xreftext>
<div element="refsection"
href=""book.dkb#id3512788"" number="">
<ttl>cmd2 ref section</ttl>
<xreftext>the section called “cmd2
ref section”</xreftext>
</div>
</div>
<div element="refentry"
href=""book.dkb#cmd2"" number="" targetptr="cmd2">
<ttl>cmd2</ttl>
<xreftext>cmd2</xreftext>
<div element="refsection"
href=""book.dkb#synop"" number="" targetptr="synop">
<ttl>SYNOPSIS</ttl>
<xreftext>the section called “SYNOPSIS”</xreftext>
</div>
</div>
</div>
</div>
###########
And the processed docbook page is displayed,
but where the olink should be I just have the text 'Test olink: refer to
the ???? section of the command 2 page' and in by httpd.log file I have
the following
Olink debug: root element of target.database
'testdb.xml' is 'targetset'.
Olink debug: cases for targetdoc='book'
and targetptr='synop' in language 'en'.
Olink debug: CaseA NOT matched
Olink debug: No case matched for lang
'en'.
Olink debug: cases for targetdoc='book'
and targetptr='synop' in language ''.
Olink debug: CaseA NOT matched
Olink debug: No case matched for lang
''.
Error: unresolved olink: targetdoc/targetptr
= 'book/synop'.
Olink error: no generated text for targetdoc/targetptr/lang
= ''.
--
Tom Kirkpatrick
Web Developer - Virus Bulletin
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]