Re: DOCBOOK: numbered QA entries how?

2002-07-19 Thread Bob Stayton

On Sat, Jul 20, 2002 at 12:10:29AM +1200, David Kilgour wrote:
 I would like my QA entries to be numbered:
 
 Q1
 
 A
 
 Q2
 
 A
 
 and for this numbering to continue across chapters. I would like to do
 this with both dsssl and xml docbook. Any suggestions welcome.

I can't say how to do this with DSSSL, and I assume 
when you say xml docbook you mean the XSL stylesheets?

For XSL, if you are willing to forego all the options 
for controlling the QandA labels and just want to hardwire
your style, then add these templates
to your XSL customization layer:

xsl:template match=question mode=label.markup
xsl:textQ/xsl:text
xsl:number level=any count=qandaentry format=1/
/xsl:template

xsl:template match=answer mode=label.markup
xsl:textA/xsl:text
/xsl:template

The xsl:number with level=any counts all instances of qandaentry
elements in your document, and doesn't reset.

But if you localize your doc (so 'Q' and 'A' might not
be appropriate), or want the option to change labeling
for a given qandaset, then you should copy the whole
template from common/labels.xsl:

xsl:template match=question|answer mode=label.markup

to your customization layer and make similar changes.

-- 

Bob Stayton 400 Encinal Street
Publications Architect  Santa Cruz, CA  95060
Technical Publications  voice: (831) 427-7796
Caldera International, Inc. fax:   (831) 429-1887
email: [EMAIL PROTECTED]



Re: DOCBOOK: numbered QA entries how?

2002-07-18 Thread Dave Pawson

At 05:10 19/07/2002, David Kilgour wrote:
I would like my QA entries to be numbered:

Q1

A

Q2

A

and for this numbering to continue across chapters. I would like to do
this with both dsssl and xml docbook. Any suggestions welcome.

If you look at www.dpawson.co.uk/docbook the qandaset there
is numbered.

I'm using the standard website stylesheets.


Regards DaveP