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] Chunking Based on Attribute


Hi,
The maketoc.xsl mechanism does not generate a toc that follows either the DocBook 4 or 5 schemas.  I'm not sure why. It seems to have its own schema.  I think tocentry was at some point going to replace the numbered toclevel elements, but it didn't work out that way when DocBook5 was implemented.
 
The tocentry element generated by maketoc.xsl can nest other tocentry elements, to form the hierarchy like nesting of section elements.  Make sure you have set these parameters when you run that stylesheet to indicate the chunking levels you want:
 
chunk.toc.level
chunk.first.sections
 
 
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Wednesday, October 22, 2008 3:33 PM
Subject: RE: [docbook-apps] Chunking Based on Attribute

Just following up on this questionÖ The DB5 transition guide indicates that the tocchap, toclevel1, toclevel2, etc., elements have been replaced with tocdiv. However, it looks like the 174-ns stylesheets donít use tocdiv anywhere and still have all the logic for processing tocchap, etc. *Should* the maketoc.xsl be writing something with just flat tocentry elements (like in the example below), or should it be writing something with tocchap, toclevel1, etc., or should it be writing something with tocdiv elements? Has maketoc.xsl ever written a nested TOC (before or after DocBook5)?

 

Hope Iím making sense. Thanks!

cheri

 

 

From: Marvin, Scot [mailto:scotm@amazon.com]
Sent: Wednesday, October 15, 2008 10:22 AM
To: Bob Stayton; docbook-apps@lists.oasis-open.org
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"?>
<toc role="chunk-toc">
 
<tocentry linkend="WhatsNew"><?dbhtml filename="WhatsNew.html"?>
 
</tocentry>
 
<tocentry linkend="Welcome"><?dbhtml filename="Welcome.html"?>
 
</tocentry>
 
<tocentry linkend="IntroductionArticle"><?dbhtml filename="IntroductionArticle.html"?>
 
</tocentry>

 

 

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.

 

Any ideas?

 

From: Bob Stayton [mailto:bobs@sagehill.net]
Sent: Wednesday, October 08, 2008 10:21 AM
To: Marvin, Scot; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Chunking Based on Attribute

 

Hi,

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.

 

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

 

 

----- Original Message -----

From: Marvin, Scot

Sent: Tuesday, October 07, 2008 12:31 PM

Subject: [docbook-apps] Chunking Based on Attribute

 

Sorry if this is explained elsewhere, but is there a way I can chunk sections based on their attribute, regardless of how deeply they are nested?

 

For example, I want to chunk all sections that have a role=ĒchunkHereĒ, but these sections might appear at many nested levels. I donít want to chunk sections that have no such attribute, regardless of their nesting level.

 

Does that make sense? Thanks for any help you can offer.

 

-Scot



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]