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] XIncludes, olinks and the xref database

I didn't mean that chapters in a book should each have their own data file.
Can you point to where I suggested that?  The separate data files were for
separate books when external xrefs were being used.  If I implied it for
chapters, I need to clarify that. Your solution to create one data file for
the book with resolved XIncludes was the right one.

The second problem is not quite clear to me.  Are you reusing the same
chapter files in multiple books, with each book having different
combinations of chapters?  And in some cases you want the olinks to resolve
to the internal target and in other cases to resolve to another book?

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Gerd v. Egidy" <lists@egidy.de>
To: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, July 21, 2005 5:47 AM
Subject: [docbook-apps] XIncludes, olinks and the xref database


I want to use seperate files (chapters) as source for different documents
(via fo and xep) and html). the content of the chapters is the same, just
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
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:

  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude";
  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="user.xml"/>

        <dir name="root">
            <document targetdoc="master">
                <xi:include href="target.db"

The target.db is created from master.xml with XInclude processing enabled,
like described in Example 22.4 of Bob's book.

<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"
         <xreftext>Section 1.1, “Marketing”</xreftext>

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
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

Is there any solution to fix all these problems?

Kind regards,


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]