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" />
30 <xsl:variable name="tactic_id">
31 <xsl:value-of select="ancestor::sect1/@id" />
37 <xsl:when test="position()=1">
38 <xsl:attribute name="id">grammar.<xsl:value-of select="$declarative"/>tactic</xsl:attribute>
39 <xsl:text disable-output-escaping='yes'>&tactic;</xsl:text>
45 <xsl:when test="position()=1">
46 <xsl:text>::=</xsl:text>
49 <xsl:text>|</xsl:text>
54 <xsl:for-each select="listitem/para/* | listitem/para/child::text()">
57 <xsl:when test="string(.) = $tactic">
58 <xsl:element name="link">
59 <xsl:attribute name="linkend">
60 <xsl:value-of select="$tactic_id" />
62 <xsl:copy-of select="." />
67 <xsl:copy-of select="." />