From: SourceForge.net <no...@so...> - 2004-11-16 19:37:35
|
Bugs item #924251, was opened at 2004-03-27 07:20 Message generated for change (Settings changed) made by xmldoc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=924251&group_id=21935 Category: DocBook XSL Group: All output formats >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Harald Jörg (hajoook) Assigned to: Michael Smith (xmldoc) Summary: Wrong numbering of Qandaset entries Initial Comment: With default parameter settings, the numbering of questions in a qandaset/qandadiv contains "too much" of inherited labels. Versions checked: docbook-xsl-1.64.0, docbook-xsl-1.65.1. An example document: ---------------------------------------------------------------------- <?xml version='1.0' encoding='ISO-8859-1'?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" > <article class="whitepaper" lang="de"> <title>Bug Demo</title> <section label="foo"> <title>A section labelled 'foo'</title> <para>Without a surrounding section, I seem to be unable to get a qandaset processed. Let's ignore that for the moment. </para> <qandaset defaultlabel="number"> <qandadiv> <title>Qandadiv One</title> <qandaentry id="q1"> <question> <para>Why is this question foo.foo.1.1?</para> </question> <answer> <para>Probably a bug in common/labels.xsl.</para> </answer> </qandaentry> </qandadiv> </qandaset> </section> </article> ---------------------------------------------------------------------- The results are: ---------------------------------------------------------------------- foo.1. Qandadiv One foo.foo.1.1. Why is this question foo.foo.1.1? Probably a bug in common/labels.xsl. ---------------------------------------------------------------------- I think I've found the reason in common/labels.xsl: If qanda.inherit.numeration is 1 (the default), a question inherits labels (1) from its surrounding lparent and (2) from its parent qandadiv. However, the qandadiv itself already contains the section's label prefix from its own inheritence processing - hence we have the section's label twice. I am attaching a patch that "works for me" though I admit that I did not try all possible combinations if label inheritance, autolabel, and explicit labeling... -- Cheers, haj ---------------------------------------------------------------------- Comment By: Michael Smith (xmldoc) Date: 2004-11-17 04:37 Message: Logged In: YES user_id=118135 A fix for this issue has been added to the current codebase. Please test the fix with the latest snapshot from: http://docbook.sourceforge.net/snapshots/ ---------------------------------------------------------------------- Comment By: Michael Smith (xmldoc) Date: 2004-11-04 13:21 Message: Logged In: YES user_id=118135 I will try the patch, see if it fixes the problem, and make sure it doesn't introduce any new problems. ---------------------------------------------------------------------- Comment By: Hans Ulrich Niedermann (hun) Date: 2004-09-08 09:45 Message: Logged In: YES user_id=59853 I should cross-check this patch against the test case I submitted a few years ago, when the quandaentry numbering was lacking one or two numbers :) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=924251&group_id=21935 |