setting-keys: Add VCONFKEY_SETAPPL_TIMEOUT_DIM
[platform/core/appfw/vconf-internal-keys.git] / create_header.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4 <xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
5 <xsl:strip-space elements="*"/>
6 <xsl:template match="/">
7 /*
8  * vconf-internal-keys
9  *
10  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  *
24  */
25         <xsl:apply-templates select="vconfkeylists/filedef"> </xsl:apply-templates>
26 </xsl:template>
27
28 <xsl:template match="filedef">
29 #ifndef <xsl:value-of select="./@name"/>
30 #define <xsl:value-of select="./@name"/>
31
32         <xsl:apply-templates select="/vconfkeylists/vconfkey"> </xsl:apply-templates>
33
34 #endif /*   <xsl:value-of select="./@name"/>    */
35 </xsl:template>
36
37 <xsl:template match="vconfkey">
38
39
40 <xsl:choose>
41   <xsl:when test="./@headeronly">
42 #ifdef USE_NONCREATED_VCONF_KEY
43 #warning using non-created vconf-key ----- please make sure this key is in use actually
44 #endif
45 <xsl:choose>
46 <xsl:when test="./comment">
47 /**
48  * <xsl:value-of select="./comment"/>
49  */
50 </xsl:when>
51 </xsl:choose>
52 #define <xsl:value-of select="./header"/> <xsl:text> </xsl:text> "<xsl:value-of select="./@name"/>"
53   </xsl:when>
54   <xsl:otherwise>
55 <xsl:choose>
56 <xsl:when test="./comment">
57 /**
58  * <xsl:value-of select="./comment"/>
59  */
60 </xsl:when>
61 </xsl:choose>
62 #define <xsl:value-of select="./header"/> <xsl:text> </xsl:text> "<xsl:value-of select="./@name"/>"
63   </xsl:otherwise>
64 </xsl:choose>
65
66
67
68         <xsl:apply-templates select="./enumlist"> </xsl:apply-templates>
69 </xsl:template>
70 <xsl:template match="enumlist">
71 <xsl:choose>
72   <xsl:when test="./@name">
73 <xsl:choose>
74 <xsl:when test="./comment">
75 /**
76  * <xsl:value-of select="./comment"/>
77  */
78 </xsl:when>
79 </xsl:choose>
80 enum <xsl:value-of select="./@name"/> {
81         <xsl:apply-templates select="./enumdata"> </xsl:apply-templates>
82 };
83   </xsl:when>
84   <xsl:otherwise>
85 <xsl:choose>
86 <xsl:when test="./comment">
87 /**
88  * <xsl:value-of select="./comment"/>
89  */
90 </xsl:when>
91 </xsl:choose>
92 enum {
93         <xsl:apply-templates select="./enumdata"> </xsl:apply-templates>
94 };
95   </xsl:otherwise>
96 </xsl:choose>
97
98
99
100
101 </xsl:template>
102
103 <xsl:template match="enumdata">
104
105 <xsl:choose>
106   <xsl:when test="./@value">
107         <xsl:value-of select="."/> = <xsl:value-of select="./@value"/>
108         <xsl:choose>
109                 <xsl:when test="position()!=last()">,
110                 </xsl:when>
111                 <xsl:otherwise><br/>
112                 </xsl:otherwise>
113         </xsl:choose>
114   </xsl:when>
115   <xsl:otherwise>
116         <xsl:value-of select="."/>
117         <xsl:choose>
118                 <xsl:when test="position()!=last()">,
119                 </xsl:when>
120                 <xsl:otherwise><br/>
121                 </xsl:otherwise>
122         </xsl:choose>
123   </xsl:otherwise>
124 </xsl:choose>
125
126 </xsl:template>
127 </xsl:stylesheet>