Debian Codegraph @

src/doc/old-manual/xsl/add_indexterm.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:a="http://docbook.org/ns/docbook"
4 exclude-result-prefixes="a"
5 version="1.0">
6 <xsl:output encoding="utf-8"/>
7
8 <!-- By default copy the whole document -->
9 <xsl:template match="node()|@*">
10 <xsl:copy>
11 <xsl:apply-templates select="node()|@*"/>
12 </xsl:copy>
13 </xsl:template>
14
15 <xsl:template match="a:refsynopsisdiv">
16 <xsl:for-each select=".//a:symbol">
17 <xsl:element name="indexterm">
18 <xsl:attribute name="type">cl</xsl:attribute>
19 <primary><xsl:value-of select="."/></primary>
20 </xsl:element>
21 </xsl:for-each>
22 <xsl:for-each select=".//a:funcsynopsis//a:function|
23 .//a:synopsys//a:type|
24 .//a:synopsys//a:variable|
25 .//a:synopsys//a:constant">
26 <xsl:if test="string-length(attribute::role)=0">
27 <xsl:element name="indexterm">
28 <xsl:attribute name="type">c</xsl:attribute>
29 <primary><xsl:value-of select="."/></primary>
30 </xsl:element>
31 </xsl:if>
32 </xsl:for-each>
33 <xsl:copy-of select="."/>
34 </xsl:template>
35
36 <!--
37 <xsl:template match="a:symbol" mode="automatic">
38 <xsl:copy-of select="."/>
39 <indexterm type="cl">
40 <primary><xsl:value-of select="."/></primary>
41 </indexterm>
42 </xsl:template>
43
44 <xsl:template match="a:function" mode="automatic">
45 <xsl:copy-of select="."/>
46 <indexterm type="c">
47 <primary><xsl:value-of select="."/></primary>
48 </indexterm>
49 </xsl:template>
50
51 <xsl:template match="a:variable" mode="automatic">
52 <xsl:copy-of select="."/>
53 <indexterm type="c">
54 <primary><xsl:value-of select="."/></primary>
55 </indexterm>
56 </xsl:template>
57
58 <xsl:template match="a:type" mode="automatic">
59 <xsl:copy-of select="."/>
60 <indexterm type="c">
61 <primary><xsl:value-of select="."/></primary>
62 </indexterm>
63 </xsl:template>
64 -->
65
66 </xsl:stylesheet>