[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Showing keywords on output
Hi folks.I've a DocBook project that has a number of articles, and many of those articles have keywords. In my case I'm slightly abusing keywords for categories, but I don't think that's a huge deal. However, I want to show the keywords in my output at the top of each article, as a definition list.
My source looks something like this: <article> <articleinfo> <keywordset> <keyword role="service">PC</keyword> <keyword role="category">Destroyer</keyword> <keyword role="variant">Tactical</keyword> <keyword role="mark">II</keyword> </keywordset> </articleinfo> <!-- ... --> </article>At one point in time with an older version of DocBook XSL, I had the following customizations working:
<xsl:template match="article//keywordset" mode="article.titlepage.recto.auto.mode">
<dl class="classification"><xsl:apply-templates select="keyword" mode="article.titlepage.recto.mode" />
</dl> </xsl:template><xsl:template match="keywordset/keyword" mode="article.titlepage.recto.mode">
<xsl:if test="@role != ''"> <dt><xsl:value-of select="@role" /></dt> <dd><xsl:apply-templates mode="article.titlepage.recto.mode"/></dd> </xsl:if> </xsl:template>But at some point they stopped working during an upgrade and I didn't notice, so I don't know what version that was. :-) As nears as I can tell, those templates are simply not matching anything so never output anything, but I don't know what to replace them with.
My questions then are:1) What's the correct way in "modern" DBXSL to grab the keywords and display them at the top of each page?
2) Is there some structure other than keywords that I should be using instead that I don't know about, that would be easier to work with?
Merci, Gracias, and all gratitudinal commentary. --Larry Garfield