1 <?xml version="1.0" encoding="utf-8"?>
\r
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
\r
7 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
\r
8 doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
\r
10 <xsl:param name="topdir" select="''"/>
\r
12 <xsl:template match="*">
\r
14 <xsl:call-template name="copy-attributes"/>
\r
15 <xsl:apply-templates/>
\r
19 <xsl:template name="copy-attributes">
\r
20 <xsl:for-each select="@*">
\r
21 <xsl:attribute name="{name(current())}">
\r
23 <xsl:when test="contains(current(),'@TOPDIR@')">
\r
24 <xsl:value-of select="substring-before(current(),'@TOPDIR@')"/>
\r
25 <xsl:value-of select="$topdir"/>
\r
26 <xsl:value-of select="substring-after(current(),'@TOPDIR@')"/>
\r
29 <xsl:value-of select="current()"/>
\r
36 <!-- Remove the automatically inserted search form (we build our own) -->
\r
37 <xsl:template match="li[form]">
\r
40 <!-- Replace @TOPDIR@ with relative top directory path -->
\r
41 <xsl:template match="@*[contains(current(),'@TOPDIR@')]">
\r
42 <xsl:value-of select="substring-before(current(),'@TOPDIR')"/>
\r
43 <xsl:value-of select="$topdir"/>
\r
44 <xsl:value-of select="substring-after(current(),'@TOPDIR')"/>
\r
47 <!-- Add 'class' attribute to some special paragraphs/lists -->
\r
49 <xsl:template name="add-class">
\r
50 <xsl:param name="class"/>
\r
52 <xsl:call-template name="copy-attributes"/>
\r
53 <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute>
\r
54 <xsl:apply-templates/>
\r
58 <xsl:template match="dl[dt/b/a/text()='Bug:']">
\r
59 <xsl:call-template name="add-class">
\r
60 <xsl:with-param name="class">xref-bug</xsl:with-param>
\r
61 </xsl:call-template>
\r
64 <xsl:template match="dl[dt/b/a/text()='Fix:']">
\r
65 <xsl:call-template name="add-class">
\r
66 <xsl:with-param name="class">xref-fix</xsl:with-param>
\r
67 </xsl:call-template>
\r
70 <xsl:template match="dl[dt/b/a/text()='Todo:']">
\r
71 <xsl:call-template name="add-class">
\r
72 <xsl:with-param name="class">xref-todo</xsl:with-param>
\r
73 </xsl:call-template>
\r
76 <xsl:template match="dl[dt/b/a/text()='Idea:']">
\r
77 <xsl:call-template name="add-class">
\r
78 <xsl:with-param name="class">xref-idea</xsl:with-param>
\r
79 </xsl:call-template>
\r
82 <xsl:template match="dl[dt/b/text()='Parameters:']">
\r
83 <xsl:call-template name="add-class">
\r
84 <xsl:with-param name="class">parameters</xsl:with-param>
\r
85 </xsl:call-template>
\r
88 <xsl:template match="dl[dt/b/text()='Implementation note:']">
\r
89 <xsl:call-template name="add-class">
\r
90 <xsl:with-param name="class">implementation</xsl:with-param>
\r
91 </xsl:call-template>
\r
94 <xsl:template match="table[descendant::td[@class='memItemLeft']]">
\r
95 <xsl:call-template name="add-class">
\r
96 <xsl:with-param name="class">members</xsl:with-param>
\r
97 </xsl:call-template>
\r
100 <xsl:template match="a[@href=string(current())]" priority="1">
\r
101 <xsl:call-template name="add-class">
\r
102 <xsl:with-param name="class">literal</xsl:with-param>
\r
103 </xsl:call-template>
\r
106 <xsl:template match="a[contains(@href,'http://')]">
\r
107 <xsl:call-template name="add-class">
\r
108 <xsl:with-param name="class">ext</xsl:with-param>
\r
109 </xsl:call-template>
\r
112 <xsl:template match="a[not(@href)]">
\r
113 <xsl:call-template name="add-class">
\r
114 <xsl:with-param name="class">anchor</xsl:with-param>
\r
115 </xsl:call-template>
\r
118 <xsl:template match="div[@class='memdoc']/p[1]">
\r
119 <xsl:call-template name="add-class">
\r
120 <xsl:with-param name="class">memtitle</xsl:with-param>
\r
121 </xsl:call-template>
\r
124 <xsl:template match="p[starts-with(text(),'Definition at line ')]">
\r
125 <xsl:call-template name="add-class">
\r
126 <xsl:with-param name="class">sourceline</xsl:with-param>
\r
127 </xsl:call-template>
\r
130 <xsl:template match="div[@class='memdoc']/p[starts-with(text(),'References ')]">
\r
131 <xsl:call-template name="add-class">
\r
132 <xsl:with-param name="class">references</xsl:with-param>
\r
133 </xsl:call-template>
\r
136 <xsl:template match="div[@class='memdoc']/p[starts-with(text(),'Referenced by ')]">
\r
137 <xsl:call-template name="add-class">
\r
138 <xsl:with-param name="class">referencedby</xsl:with-param>
\r
139 </xsl:call-template>
\r
142 <xsl:template match="div[@class='memdoc']/p[starts-with(text(),'Reimplemented from ')]">
\r
143 <xsl:call-template name="add-class">
\r
144 <xsl:with-param name="class">reimplementedfrom</xsl:with-param>
\r
145 </xsl:call-template>
\r
148 <xsl:template match="div[@class='memdoc']/p[starts-with(text(),'Reimplemented in ')]">
\r
149 <xsl:call-template name="add-class">
\r
150 <xsl:with-param name="class">reimplementedin</xsl:with-param>
\r
151 </xsl:call-template>
\r
154 <xsl:template match="div[@class='memdoc']/p[starts-with(text(),'Implemented in ')]">
\r
155 <xsl:call-template name="add-class">
\r
156 <xsl:with-param name="class">implementedin</xsl:with-param>
\r
157 </xsl:call-template>
\r
160 <!-- Remove external items from the namespace index -->
\r
161 <xsl:template match="div[@id='content2']/table[contains(preceding-sibling::h1/text(),'Namespace Reference')]/tr[td[@class='memItemRight']/a[1][@class='elRef'][@doxygen]]">
\r
164 <!-- Remove [external] references from the modules page -->
\r
165 <xsl:template match="div[@id='content2']/ul/li[a/@class='elRef'][a/@doxygen][code/text()='[external]'][not(ul)]">
\r