[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Differences in olink sitemap: entities vs. xinclude
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 =======
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE targetset
SYSTEM "http://<path-to-server>/docbook-xsl-1.75.2/common/targetdatabase.dtd" [
<!ENTITY prj1_usr_adm_targets SYSTEM "file:///d:/doc/docbook-xsl/html-xsl/olink.mechanism/project1/trunk/project1_usr_adminguide.target.db">
<!ENTITY prj1_usr_usr_targets SYSTEM "file:///d:/doc/docbook-xsl/html-xsl/olink.mechanism/project1/trunk/project1_usr_userguide.target.db">
<!ENTITY prj2_usr_adm_targets SYSTEM "file:///d:/doc/docbook-xsl/html-xsl/olink.mechanism/project2/trunk/project2_usr_adminguide.target.db">
<!ENTITY prj2_usr_usr_targets SYSTEM "file:///d:/doc/docbook-xsl/html-xsl/olink.mechanism/project2/trunk/project2_usr_userguide.target.db">
]>
<targetset>
<targetsetinfo>Master target db for the trunk documents</targetsetinfo>
<!-- Site map for generating relative paths between documents -->
<sitemap>
<!-- Can be only one root dir for all output -->
<dir name="olink.mechanism">
<dir name="project1">
<dir name="trunk">
<document targetdoc="project1_usr_adminguide">
&prj1_usr_adm_targets;
</document>
<document targetdoc="project1_usr_userguide">
&prj1_usr_usr_targets;
</document>
</dir>
</dir>
<dir name="project2">
<dir name="trunk">
<document targetdoc="project2_usr_adminguide">
&prj2_usr_adm_targets;
</document>
<document targetdoc="project2_usr_userguide">
&prj2_usr_usr_targets;
</document>
</dir>
</dir>
</dir>
</sitemap>
</targetset>
2. Xinclude based sitemap (Win machine) =======
<?xml version="1.0" encoding="UTF-8"?>
<targetset xmlns:xi="http://www.w3c.org/2001/XInclude">
<targetsetinfo>Master target db for the trunk documents using XIncludes</targetsetinfo>
<!-- Site map for generating relative paths between documents -->
<sitemap>
<!-- Can be only one root dir for all output -->
<dir name="olink.mechanism">
<dir name="project1">
<dir name="trunk">
<document targetdoc="project1_usr_adminguide">
<!-- Can be relative path href="/home/me/..." -->
<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>
</dir>
</dir>
<dir name="project2">
<dir name="trunk">
<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>
</dir>
</dir>
</dir>
</sitemap>
</targetset>
3. Xinclude based sitemap (Linux machine) =======
<?xml version="1.0" encoding="UTF-8"?>
<targetset xmlns:xi="http://www.w3c.org/2001/XInclude">
<targetsetinfo>Master target db for the trunk documents using XIncludes</targetsetinfo>
<!-- Site map for generating relative paths between documents -->
<sitemap>
<!-- Can be only one root dir for all output -->
<dir name="olink.mechanism">
<dir name="project1">
<dir name="trunk">
<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>
</dir>
</dir>
<dir name="project2">
<dir name="trunk">
<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>
</dir>
</dir>
</dir>
</sitemap>
</targetset>
--
Best regards,
Eduard Tibet
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]