-
Notifications
You must be signed in to change notification settings - Fork 1
/
doxygen2keywords.xsl
64 lines (51 loc) · 1.94 KB
/
doxygen2keywords.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
-->
<!--
This tool resides and is maintained at
https://github.com/bengtmartensson/KeywordsTxtGenerator
-->
<!-- Author: Bengt Martensson -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text" />
<xsl:template match="/doxygenindex">
<xsl:text>#######################################
# Syntax Coloring Map For the current project.
# This file was generated by doxygen2keywords.xsl.
#######################################
#######################################
# Classes and structs (KEYWORD1)
#######################################
</xsl:text>
<xsl:apply-templates select="compound[@kind='class' or @kind='struct' ]"/>
<xsl:text>
#######################################
# Methods (KEYWORD2)
#######################################
</xsl:text>
<xsl:apply-templates select="compound/member[@kind='function']"/>
<xsl:text>
#######################################
# Constants (LITERAL1)
#######################################
</xsl:text>
<xsl:apply-templates select="compound/member[@kind='define' or @kind='enumvalue']"/>
</xsl:template>
<xsl:template match="compound[@kind='class' or @kind='struct' ]">
<xsl:value-of select="name"/>
<xsl:text>	KEYWORD1
</xsl:text>
</xsl:template>
<xsl:template match="member[@kind='function']">
<xsl:value-of select="name"/>
<xsl:text>	KEYWORD2
</xsl:text>
</xsl:template>
<xsl:template match="member[@kind='define' or @kind='enumvalue']">
<xsl:value-of select="name"/>
<xsl:text>	LITERAL1
</xsl:text>
</xsl:template>
</xsl:stylesheet>