This is the mail archive of the
mailing list for the DocBook project.
Re: [docbook] Marking up exercices
- From: Bob Stayton <bobs at sco dot com>
- To: Joachim Ziegler <ziegler at mpi-sb dot mpg dot de>
- Cc: "docbook at lists dot oasis-open dot org" <docbook at lists dot oasis-open dot org>
- Date: Mon, 13 Oct 2003 15:42:09 -0700
- Subject: Re: [docbook] Marking up exercices
- References: <3F8AB392.email@example.com>
On Mon, Oct 13, 2003 at 04:15:46PM +0200, Joachim Ziegler wrote:
> Hello list,
> What's the current state of the art in marking up exercises, exercise
> sections and answers to exercises?
> I want to have sections with a title "Exercises" in which one ore more
> exercices appear.
> The following features would be nice:
> - Exercise sections should not be numbered, not appear in the TOC, but
> be allowed to appear at any level in the document.
Sounds like a bridgehead.
You can render them all in the same style by
using its renderas attribute consistently.
> - The exercises should be numbered throughout the whole document by the
> stylesheets. (If that's not possible, then if an exercise within an
> exercise section is the only one, it should not get number "1", because
> that's obvious.)
You can number consecutively with a stylesheet customization
such as this:
<xsl:template match="question" mode="label.markup">
<xsl:number level="any" count="qandaentry" format="1"/>
By setting level="any", it will consecutively count all
qandaentry elements in the entire document.
> - Answers to exercises should only be output in a "teacher's version" of
> the document.
That would be conditional text (profiling), probably
using the 'userlevel' attribute on each answer element.
If you don't want to add such an attribute to every
answer element, then customize the stylesheet for answer
<xsl:if test="$profile.userlevel = 'teacher'">
Then if you set the command line parameter
profile.userlevel to anything but 'teacher' then the
answers will disappear regardless of the profiling
attributes. Fortunately, the answer element in a
qandaentry is optional, so you can filter it out for the
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
To unsubscribe from this list, send a post to firstname.lastname@example.org, or visit http://www.oasis-open.org/mlmanage/.