Hello!
While playing with the olink logic (as mentioned here:
http://www.sagehill.net/docbookxsl/Olinking.html) I tried 2 different ways to create the sitemap (olink database document).
First I've created the sitemap based on entities (as described here:
http://www.sagehill.net/docbookxsl/Olinking.html#DatabaseExample). Second - based on xinclude (as described here:
http://www.sagehill.net/docbookxsl/OlinkVariations.html#XincludeOlinkdb).When I try to get the final html document using entity-based sitemap (target.database.document) all olink-based hrefs are created correctly without any problems. The problem arise when I try to get the final html document using xinclude-based sitemap - message "Error: unresolved olink: targetdoc/targetptr" appears. Documents, paths, targetdb files are the same in these two ways. The only difference is in sitemap file. I tried to change the xinclude-based sitemap:
1. Moving namespace declaration from <xi:include href ...> to the root element (<targetset>) (like in the samples below)
2. Trying to setup all files on linux-based system with different xsltproc version.
3. Trying to use absolute/relative path in <xi:include href="..." (testing the influencing of the <xi:include href="..." URI format).
All with no success. For generation I use xsltproc (WinXP) with --xinclude, --xincludestyle options turning on. On linux based machine: xsltproc (Debian Lenny 5.0) with --xinclude, --xincludestyle options turning on. I use <xsl:param name="current.docid" select="/*/@id"></xsl:param> while creating final documents as described in tip in the end of this section:
http://www.sagehill.net/docbookxsl/Olinking.html#LinkBetweenDocs .
I would be appreciated if you tell me where I'm wrong or where I made a mistake. Below are samples of files I use.
Thank you!
1. Entity based sitemap =======
SYSTEM "http://<path-to-server>/docbook-xsl-1.75.2/common/targetdatabase.dtd" [
]>
<targetset>
<targetsetinfo>Master target db for the trunk documents</targetsetinfo>
<sitemap>
<document targetdoc="project1_usr_adminguide">
&prj1_usr_adm_targets;
</document>
<document targetdoc="project1_usr_userguide">
&prj1_usr_usr_targets;
</document>
<document targetdoc="project2_usr_adminguide">
&prj2_usr_adm_targets;
</document>
<document targetdoc="project2_usr_userguide">
&prj2_usr_usr_targets;
</document>
</sitemap>
</targetset>
2. Xinclude based sitemap (Win machine) =======
<targetset xmlns:xi="http://www.w3c.org/2001/XInclude">
<targetsetinfo>Master target db for the trunk documents using XIncludes</targetsetinfo>
<sitemap>
<document targetdoc="project1_usr_adminguide">
<xi:include href="file:///d:/doc/docbook-xsl/html-xsl/olink.mechanism/project1/trunk/project1_usr_adminguide.target.db"/>
</document>
<document targetdoc="project1_usr_userguide">
<xi:include href="file:///d:/doc/docbook-xsl/html-xsl/olink.mechanism/project1/trunk/project1_usr_userguide.target.db"/>
</document>
<document targetdoc="project2_usr_adminguide">
<xi:include href="file:///d:/doc/docbook-xsl/html-xsl/olink.mechanism/project2/trunk/project2_usr_adminguide.target.db"/>
</document>
<document targetdoc="project2_usr_userguide">
<xi:include href="file:///d:/doc/docbook-xsl/html-xsl/olink.mechanism/project2/trunk/project2_usr_userguide.target.db"/>
</document>
</sitemap>
</targetset>
3. Xinclude based sitemap (Linux machine) =======
<targetset xmlns:xi="http://www.w3c.org/2001/XInclude">
<targetsetinfo>Master target db for the trunk documents using XIncludes</targetsetinfo>
<sitemap>
<document targetdoc="project1_usr_adminguide">
<xi:include href="file:///home/eduardtibet/experiments/olink.mechanism/project1/trunk/project1_usr_adminguide.target.db"/>
</document>
<document targetdoc="project1_usr_userguide">
<xi:include href="file:///home/eduardtibet/experiments/olink.mechanism/project1/trunk/project1_usr_userguide.target.db"/>
</document>
<document targetdoc="project2_usr_adminguide">
<xi:include href="file:///home/eduardtibet/experiments/olink.mechanism/project2/trunk/project2_usr_adminguide.target.db"/>
</document>
<document targetdoc="project2_usr_userguide">
<xi:include href="file:///home/eduardtibet/experiments/olink.mechanism/project2/trunk/project2_usr_userguide.target.db"/>
</document>
</sitemap>
</targetset>
--
Best regards,
Eduard Tibet