[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] qanda tags with propagate.style
Yes, qandaentry is handled in a special way because qandaset is output in an HTML layout table, so each qandaentry becomes two row (tr) elements in HTML output, one for the question and one for the answer. In each row, the label is put in the first column and the paragraphs in the second. A table layout is used so that the width of the first column can adjust to fit the label, which can be long if labels are customized.
If you peek in the xhtml/qandaset.xsl, you can see that the template that matches on "qandaentry" just does an xsl:apply-templates. The templates matching on "question" and "answer" each create its row. So your customization just needs to be modified a bit, so it matches on the child elements:
That will add the class value to the <tr> elements for the question and answer.
*But* there is one more thing that must be done. It seems that not all of the qandaset templates have been updated to apply the template using mode="class.value". The question template does, but the answer template does not. I'll fix that in SVN, but for now you would need to customize the template matching on "answer". Copy that template and change this line from:
<xsl:apply-templates select="." mode="class.attribute"/>