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] Heavy Set TOC customization


Hi Larry,
This little customization will do what you want.  It generates just the set
chunk, and does not output any book HTML because the template matching on
book is null.  It sets the 'toc.max.depth' parameter to 1, so that only book
titles are shown.  Set it to 2 if you want to include chapters.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="1.0">

<xsl:import href="../docbook-xsl-1.68.1/html/chunk.xsl"/>

<!-- Only one level in the set TOC, for book titles  -->
<xsl:param name="toc.max.depth" select="1"/>

<!-- Don't process book elements at all -->
<xsl:template match="book"/>

</xsl:stylesheet>


You can solve the book1/index.html reference problem by adding these to each
<book> element:

<?dbhtml dir="book1"?>
<?dbhtml filename="index.html"?>

This will tell both your book stylesheet and this set TOC stylesheet to use
that filename for the book.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Larry Garfield" <larry@garfieldtech.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, July 06, 2005 3:05 PM
Subject: [docbook-apps] Heavy Set TOC customization


I have a collection of <book>s in a <set>. Each book is being generated
separately so that each can have different build parameters, and those are
all working (more or less), and placed into directories based on their name.
(Eg, build/book1/, build/book2/, etc.)

I also want to generate a build/index.html file that provides an overview of
each book. The default templates, when run on the main file with the <set>,
just generate a massive TOC of all books, parts, chapters/articles,
sections,
subsections, etc. Additionally, the links for the books themselves don't
work. They come out as, for instance, "build/book1/book1.html" instead of
"build/book1/index.html". (Not surprising, given that each book has an id
and I have use-id-for-filename set to support all the other files.)

I suppose the first-blush solution is to just gut the set template and make
a
very simple alternative that lists each book's title and hard code a
"/bookid/index.html" path into the links. That feels very hacky-cludgy,
however, and I suspect not at all portable. It also gets much more
complicated if I want to include, say, an author or summary of each book on
the main set page.

Has anyone else run into this sort of issue before? If so, how did you
address it?

-- 
Larry Garfield AIM: LOLG42
larry@garfieldtech.com ICQ: 6817012

"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it."  -- Thomas
Jefferson

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