[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Chunking XHTML without navigation for book "part" tags
Hi,To do this, you would need to copy and modify the two large templates named 'chunk.first.section.with.parent' and 'chunk.all.sections' from xhtml/chunk-common.xsl to your chunking customization layer. Those two templates compute the Next and Previous links using big select statements in variables named "next" and "prev". In those variables, you will see that the list of elements includes "part", so you need to remove it:
|preceding::d:part[1]You need to leave those selections where part is used in a predicate (in square brackets) to quality another element, such as:
|preceding::bibliography[parent::article or parent::book or parent::part][1]Those variables are only used for the next and prev links, and not the chunking or TOC lists.
Bob Stayton Sagehill Enterprises bobs@sagehill.net----- Original Message ----- From: "Thangalin" <thangalin@gmail.com>
To: <docbook@lists.oasis-open.org> Sent: Tuesday, July 10, 2012 7:10 PM Subject: [docbook] Chunking XHTML without navigation for book "part" tags
Hi, I have a book in the following format: <book> <bookinfo> ... </bookinfo> <part> <title>First Part Title</title> <chapter id="html-filename-01"> <title>First Chapter Title</title> <para>...</para> </chapter> <chapter id="html-filename-01"> <title>Second Chapter Title</title> <para>...</para> </chapter> </part> <part><title>Second Part Title</title> ... </part> <part><title>Third Part Title</title> ... </part> </book> There are about 15 parts split across 90 chapters. I'm using xmlto to generate the XHTML pages, and it works great: xmlto --skip-validation -m config.xsl xhtml book.xml -o docbook The problem is that I'm trying to make the navigation links skip seamlessly between chapters, ignoring the parts, while keeping the chapter ids as file names (i.e., use.id.as.filename). Unfortunately, the "next" link at the end of a part disappears. Without the modifications I've made (see the attached config.xsl), the "next" link directs to the next part of the book. I want it to skip the part and link to the next chapter of the book (as though the parts didn't exist). I have to keep the parts because the table of contents should include the different book parts. I tried using a layout of book :: chapter :: section (instead of book :: part :: chapter), but then I wasn't able to generate the appropriate file names. My question is this: When chunking a DocBook into XHTML format, how can book part tags be skipped from the navigation, but retained for the main TOC? Thank you!
--------------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.orgFor additional commands, e-mail: docbook-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]