Diff of /xsl/add_indexterm.xml [a12746] .. [5d2657] Maximize Restore

  Switch to side-by-side view

--- a/xsl/add_indexterm.xml
+++ b/xsl/add_indexterm.xml
@@ -11,40 +11,55 @@
   </xsl:copy>
 </xsl:template>
 
-<xsl:template match="a:symbol">
-  <!-- Copy original element -->
+<xsl:template match="a:refsynopsisdiv">
+  <xsl:for-each select=".//a:symbol">
+    <xsl:element name="indexterm">
+      <xsl:attribute name="type">cl</xsl:attribute>
+      <primary><xsl:value-of select="."/></primary>
+    </xsl:element>
+  </xsl:for-each>
+  <xsl:for-each select=".//a:funcsynopsis//a:function|
+			.//a:synopsys//a:type|
+			.//a:synopsys//a:variable|
+			.//a:synopsys//a:constant">
+    <xsl:if test="string-length(attribute::role)=0">
+      <xsl:element name="indexterm">
+	<xsl:attribute name="type">c</xsl:attribute>
+	<primary><xsl:value-of select="."/></primary>
+      </xsl:element>
+    </xsl:if>
+  </xsl:for-each>
   <xsl:copy-of select="."/>
-  <!-- Create new index entries -->
+</xsl:template>
+
+<!--
+<xsl:template match="a:symbol" mode="automatic">
+  <xsl:copy-of select="."/>
   <indexterm type="cl">
     <primary><xsl:value-of select="."/></primary>
   </indexterm>
 </xsl:template>
 
-<xsl:template match="a:function">
-  <!-- Copy original element -->
+<xsl:template match="a:function" mode="automatic">
   <xsl:copy-of select="."/>
-  <!-- Create new index entries -->
   <indexterm type="c">
     <primary><xsl:value-of select="."/></primary>
   </indexterm>
 </xsl:template>
 
-<xsl:template match="a:variable">
-  <!-- Copy original element -->
+<xsl:template match="a:variable" mode="automatic">
   <xsl:copy-of select="."/>
-  <!-- Create new index entries -->
   <indexterm type="c">
     <primary><xsl:value-of select="."/></primary>
   </indexterm>
 </xsl:template>
 
-<xsl:template match="a:type">
-  <!-- Copy original element -->
+<xsl:template match="a:type" mode="automatic">
   <xsl:copy-of select="."/>
-  <!-- Create new index entries -->
   <indexterm type="c">
     <primary><xsl:value-of select="."/></primary>
   </indexterm>
 </xsl:template>
+-->
 
 </xsl:stylesheet>