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] Qanda: HTML: Not renumber on qandadiv

This worked.  Thank you Bob for your help on this.

I also had to change the level from multiple to any, which I don't understand why.

     <xsl:when test="$deflabel = 'number' and (self::question or self::answer)">
       <xsl:value-of select="$prefix"/>
-      <xsl:number level="multiple" count="qandaentry" format="1"/>
+      <xsl:number level="any" from='qandaset' count="qandaentry" format="1"/>

On Fri, Apr 1, 2011 at 1:52 PM, Bob Stayton <bobs@sagehill.net> wrote:
As with most numbers generated by DocBook XSL, the stylesheet uses mode="label.markup" for questions and answers.  This template from common/labels.xsl would need to be customized:
<xsl:template match="question|answer" mode="label.markup">
The xsl:choose in that template handles the various labeling options that are available for qandasets.  I think the last xsl:when handles plain numbering, using xsl:number.  Change the attributes on xsl:number to add a "from" attribute.
Bob Stayton
Sagehill Enterprises
----- Original Message -----
From: David Link
Sent: Thursday, March 31, 2011 11:58 AM
Subject: [docbook-apps] Qanda: HTML: Not renumber on qandadiv


Is there a way to not renumber qandaentries after qandadivs?

Example Representation of XML Docbook:

section [end-of-chapter] (gob-ch01_s08)
.    qandaset (gob-ch01_s08_qs01)
.    .    qandadiv (gob-ch01_s08_qs01_qd01)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd01_qa01)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd01_qa02)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd01_qa03)
.    .    qandadiv (gob-ch01_s08_qs01_qd02)
.    .    .    (Some content here specific to this section)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd02_qa11)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd02_qa12)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd02_qa13)

We like the second qandadiv set of qandaentries to not restart numbering at 1.

We are using docbook-xsl-1.75.2 xhtml-1.1

Thank you
David Link
New York.

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