From: SourceForge.net <no...@so...> - 2004-09-08 00:45:13
|
Bugs item #924251, was opened at 2004-03-26 23:20 Message generated for change (Comment added) made by hun You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=924251&group_id=21935 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Harald Jörg (hajoook) Assigned to: Nobody/Anonymous (nobody) 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: Hans Ulrich Niedermann (hun) Date: 2004-09-08 02: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 |