1 <xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7 omit-xml-declaration="yes"
10 <xsl:template match="/">
12 <xsl:apply-templates select="//varlistentry[@role='tactic.synopsis']">
13 <xsl:sort select="ancestor::sect1/title" />
14 </xsl:apply-templates>
18 <xsl:template match="varlistentry">
20 <xsl:variable name="tactic">
21 <xsl:value-of select="ancestor::sect1/title" />
26 <xsl:for-each select="listitem/para/* | listitem/para/child::text()">
29 <xsl:when test="string(.) = $tactic">
30 <xsl:element name="link">
31 <xsl:attribute name="linkend">
32 <xsl:text>tac_</xsl:text>
33 <xsl:value-of select="$tactic" />
35 <xsl:copy-of select="." />
40 <xsl:copy-of select="." />