[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: XIncludes, olinks and the xref database
Hi, I want to use seperate files (chapters) as source for different documents (pdf (via fo and xep) and html). the content of the chapters is the same, just the selection and order of the chapters is different. I'm using XIncludes to select the chapters. That part is working fine. I'm currently trying to make links between the chapters possible. 1. Some links are within the same document (pdf) and must resolve to internal pdf links. 2. Some links are to chapters that are not within the current selection and should link to the corresponding webpage. 3. All link texts must have correct chapter / section numbers (section.autolabel=1, section.label.includes.component.label=1). I first tried to have a separate target.db for every chapter as suggested in DocBook XSL: The Complete Guide, Chapter 23 . But the chapter / section numbers of the xreftexts were always starting with 1. The second problem was that all links to different chapters that were within the same document were external pdf links. I could not find a way to tell the processor what targetdocs are local and what remote. So I found a different way to fix this: I now create one huge target.db for the master db with all XIncludes resolved. Like this: master.xml: <book> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="overview.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="user.xml"/> </book> olinkdb.xml: <targetset> <sitemap> <dir name="root"> <document targetdoc="master"> <xi:include href="target.db" xmlns:xi="http://www.w3.org/2001/XInclude"/> </document> </dir> </sitemap> </targetset> The target.db is created from master.xml with XInclude processing enabled, like described in Example 22.4 of Bob's book. target.db: <div element="book" href="#d0e2" number=""> <div element="chapter" href="#overview" number="1" targetptr="overview"> <ttl>Product Overview</ttl> <xreftext>Chapter 1, Product Overview</xreftext> <div element="sect1" href="#marketing" number="1.1" targetptr="marketing"> <ttl>Marketing</ttl> <xreftext>Section 1.1, “Marketing”</xreftext> </div> ... Now all olinks can point to targetdoc="master" and thus resolve as local. The problem with this solution is that I can't have links to sections that are not in the current set of chapters. Because in some selections they are, all targetdocs have to point to "master" and I can't change that in the chapters dynamically. Is there any solution to fix all these problems? Kind regards, Gerd
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]