1 <xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7 omit-xml-declaration="yes"
10 <xsl:param name="declarative" value=""/>
12 <xsl:template match="/">
13 <table frame="topbot" rowsep="0" colsep="0" role="grammar">
14 <title>tactics</title>
17 <xsl:apply-templates select="//chapter[@id=concat('sec_',$declarative,'tactics')]//varlistentry[@role='tactic.synopsis']">
18 <xsl:sort select="ancestor::sect1/title" />
19 </xsl:apply-templates>
25 <xsl:template match="varlistentry">
27 <xsl:variable name="tactic">
28 <xsl:value-of select="ancestor::sect1/title" />
34 <xsl:when test="position()=1">
35 <xsl:attribute name="id">grammar.<xsl:value-of select="$declarative"/>tactic</xsl:attribute>
36 <xsl:text disable-output-escaping='yes'>&tactic;</xsl:text>
42 <xsl:when test="position()=1">
43 <xsl:text>::=</xsl:text>
46 <xsl:text>|</xsl:text>
51 <xsl:for-each select="listitem/para/* | listitem/para/child::text()">
54 <xsl:when test="string(.) = $tactic">
55 <xsl:element name="link">
56 <xsl:attribute name="linkend">
57 <xsl:text>tac_</xsl:text>
58 <xsl:value-of select="$tactic" />
60 <xsl:copy-of select="." />
65 <xsl:copy-of select="." />