[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Chunking Based on Attribute
Thanks Bob (and to David Cramer for the dbhtml solution).
I have a problem with DB 5, however. The generated XML TOC file from maketoc.xsl doesn’t seem to be a valid DB5 file. Looking at the latest stylesheets, there doesn’t seem to be any logic for generating the new <tocdiv> element. I get only <tocentry> and that’s it.
Here’s a sample of what I get:
<?xml version="1.0" encoding="utf-8"?>
Maybe I’m not setting a parameter correctly? But I don’t see how to nest TOC elements when only a <toc> and <tocentry> elements are generated.
There is no direct support in the HTML chunking stylesheet to chunk based on attributes. However, you could implement something like this using a two-step process. The chunking stylesheet supports chunking based on an external chunk TOC, as described in the section titled "Manually control chunking" in this reference:
You could create a custom XSL that extracts such a TOC from your document based on your role attribute, and then use that TOC to chunk the document in the second step.