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] Q&A sets within an article: How to insert QandASet title to the article TOC


Oops, incomplete solution.  You also need to add this:

<xsl:template match="qandaset" mode="toc">
  <xsl:call-template name="toc.line"/>
</xsl:template>

This mode is what processes an element for a TOC.  I thought there was one
for qandaset, but there wasn't.

If you were also wanting to list questions under the set title in the TOC,
you would expand this template to select the questions and process them in
mode="toc" too.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Zbyszek Cybulski" <z.cybulski@gmail.com>
To: "Bob Stayton" <bobs@sagehill.net>
Cc: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, February 15, 2006 11:27 AM
Subject: Re: [docbook-apps] Q&A sets within an article: How to insert
QandASet title to the article TOC


Hi,

I have tried the solution you suggested, Bob, and found it not
satisfactory.
The problem is that QandASet titles are listed inline along with the
questions within each qandaset. QandASet titles were not listed one per
line
in the article TOC. I can send a sample off the list, if necessary.

-Zbyszek

On 1/26/06, Bob Stayton <bobs@sagehill.net> wrote:
>
> Hi,
> You can customize the template named 'component.toc' from
> html/autotoc.xsl.  It calls a template named 'make.toc' with a parameter
> named 'nodes', which selects what elements to include in the toc.  If you
> add qandaset to the selection for 'nodes', you should get them in your
> article toc.
>
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
>
>
>
> ----- Original Message -----
> *From:* Zbyszek Cybulski <z.cybulski@gmail.com>
> *To:* DocBook Apps <docbook-apps@lists.oasis-open.org>
> *Sent:* Wednesday, January 25, 2006 3:41 AM
> *Subject:* [docbook-apps] Q&A sets within an article: How to insert
> QandASet title to the article TOC
>
> Hi list,
>
> my problem is as in the message subject.
>
> I have an article, like below:
>
> <article class="faq">
>     <articleinfo>
>         <title>FAQ</title>
>         <subtitle>something</subtitle>
>         <releaseinfo>Release number</releaseinfo>
>     </articleinfo>
>     <xi:include href="qa1.xml"/>
>     <xi:include href="qa2.xml"/>
>     <xi:include href=" qa3.xml"/>
> </article>
>
> Each XIncluded file is a QandASet, like the following:
>
> <qandaset id="general_security">
>     <title>Security issues</title>
>     <qandaentry id="forgot_pwd">
>         <question>
>             <para>I forgot my password. How can I retrieve it?</para>
>         </question>
>         <answer><para>The answer is...</para>
>         </answer>
>     </qandaentry>
> </qandaset>
>
>
> How do I define my customization layer to have the HTML output similar to
> the following?
>
> FAQ
> something
> Release number
> -------------------------------
> Table of Contents
>
> Security issues
> QASet2 title
> QASet3 title
>
> --------------------------------
> Security issues
> 1. I forgot my password. How can I retrieve it?
> 2. Q2
>
>
> QASet2 title
> 1. Q1
> 2. Q2
>
> QASet3 title
> 1. Q1
> 2. Q2
>
>
> I have set <xsl:param name="generate.toc">article toc,title qandaset
> toc</xsl:param>, but it does not work. That is, questions are listed
within
> each Q&ASet but I do not see article's ToC.
>
> I can accept the following output or any combination of it that will
> provide the article ToC:
>
> FAQ
> something
> Release number
> -------------------------------
> Table of Contents
>
> Security issues
>     1. I forgot my password. How can I retrieve it?
>     2. Q2
> QASet2 title
>     1. Q1
>     2. Q2
> QASet3 title
>     1. Q1
>     2. Q2
> --------------------------------
> Security issues
> 1. I forgot my password. How can I retrieve it?
> 2. Q2
>
>
> QASet2 title
> 1. Q1
> 2. Q2
>
> QASet3 title
> 1. Q1
> 2. Q2
>
>
> Thanks in advance,
>
> -Zbyszek
>
>




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