[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] docbook qandaset
Hi Mathieu,
On Fri, 3 Aug 2012 12:20:32 +0200
Mathieu Malaterre <mathieu.malaterre@gmail.com> wrote:
> I'd like to prepare some exercise for some presentation I will be
> doing. I am looking at qandaset as it seems the most appropriate for
> doing question and answer style document. However I'd like to hide the
> answer when presenting the question.
>
> I tried a simple approach using hard-break
> (http://www.sagehill.net/docbookxsl/PageBreaking.html). But this fails
> with:
>
> Error reported by XML parser: The prefix "fo" for element "fo:block"
> is not bound.
You've forgot to add the FO namespace. Check the header of your
stylesheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version='1.0'>
> So my question is: is there another way of doing this ?
> My initial approach was to use foil (from slides), but there is not
> such properties as foil.autolabel for numbering of questions.
>
> I am generating PDF output so I cannot use:
> https://lists.oasis-open.org/archives/docbook-apps/201201/msg00083.html
The usual approach is to write a customization layer. Here you can find
how to do it:
http://doccookbook.sourceforge.net/html/en/dbc.common.dbcustomize.html
http://www.sagehill.net/docbookxsl/CustomMethods.html#CustomizationLayer
Add in your customization layer an empty answer template like this:
<xsl:template match="answer"/>
Whenever you process your document with your own customization layer,
all the answers will be suppressed.
Hope that answers you question. :-)
--
Gruß/Regards,
Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]