This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] How to generate list of tables from DocBook article??


The stylesheets currently only support a list of tables for the book
element. The article template simply doesn't call the 'list.of.titles'
template like the book element does.

You could easily customize the article template. Copy the match="article"
template from fo/component.xsl to your customization layer.  Find the place
where it triggers processing the toc:
 <xsl:if test="contains($toc.params, 'toc')">
   ...
</xsl:if>

After the toc processing, you want to do something similar for processing
the list of tables. The match="book" template in fo/division.xsl does that,
but it starts a new page sequence for each list, which you would not want
for your article, which is a single page-sequence. So just take the guts of
it:

<xsl:if test="contains($toc.params,'table') and .//table">
        <xsl:call-template name="list.of.titles">
          <xsl:with-param name="titles" select="'table'"/>
          <xsl:with-param name="nodes" select=".//table"/>
        </xsl:call-template>
</xsl:if>

I didn't test this, but something like it should work.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Stefan Dalibor" <Stefan.Dalibor@informatik.uni-erlangen.de>
To: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, April 15, 2004 3:31 AM
Subject: [docbook-apps] How to generate list of tables from DocBook
article??


> I'm formatting a DocBook article to HTML and PDF, using xsltproc
> (libxml 20604, libsxlt 10102, libexslt 802) and fop 0.20.5 with
> the Docbook XML DTD 4.2 and the Docbook XSL stylesheets 1.65 under
> Cygwin.
>
> Generally this works fine, but though I have set
>
> <xsl:param name="generate.toc">article toc,table</xsl:param>
>
> in my customization layer, I can't generate a list of tables.
>
> If I convert the input document to a Docbook book, the lot is generated;
> likewise, I can supress the toc generation if I remove `toc' from the
> generate.toc parameter.
> What do I have to do to get a lot in an article?
>
> Thanks!
>
> Stefan
>
> To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.
>
>
>



To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]