[SOFTAP] Add vconf key for softap
[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 #define <xsl:value-of select="./header"/> <xsl:text> </xsl:text> "<xsl:value-of select="./@name"/>"
46   </xsl:when>
47   <xsl:otherwise>
48 #define <xsl:value-of select="./header"/> <xsl:text> </xsl:text> "<xsl:value-of select="./@name"/>"
49   </xsl:otherwise>
50 </xsl:choose>
51
52
53
54         <xsl:apply-templates select="./enumlist"> </xsl:apply-templates>
55 </xsl:template>
56 <xsl:template match="enumlist">
57 <xsl:choose>
58   <xsl:when test="./@name">
59 enum <xsl:value-of select="./@name"/> {
60         <xsl:apply-templates select="./enumdata"> </xsl:apply-templates>
61 };
62   </xsl:when>
63   <xsl:otherwise>
64 enum {
65         <xsl:apply-templates select="./enumdata"> </xsl:apply-templates>
66 };
67   </xsl:otherwise>
68 </xsl:choose>
69
70
71
72
73 </xsl:template>
74
75 <xsl:template match="enumdata">
76
77 <xsl:choose>
78   <xsl:when test="./@val">
79         <xsl:value-of select="."/> = <xsl:value-of select="./@val"/>
80         <xsl:choose>
81                 <xsl:when test="position()!=last()">,
82                 </xsl:when>
83                 <xsl:otherwise><br/>
84                 </xsl:otherwise>
85         </xsl:choose>
86   </xsl:when>
87   <xsl:otherwise>
88         <xsl:value-of select="."/>
89         <xsl:choose>
90                 <xsl:when test="position()!=last()">,
91                 </xsl:when>
92                 <xsl:otherwise><br/>
93                 </xsl:otherwise>
94         </xsl:choose>
95   </xsl:otherwise>
96 </xsl:choose>
97
98 </xsl:template>
99 </xsl:stylesheet>