Add missing files
[bcusdk.git] / xml / gui / AppInfoToConfigDescSample.xslt
blobecf831eb8a22d25752004348e091057b43b8d10f
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Create a sample Configuration Description from a Application Information
4 Copyright (C) 2005-2011 Martin Koegler mkoegler@auto.tuwien.ac.at
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 -->
21 <!-- version 0.0.0 -->
22 <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
23 <xsl:template xmlns:ai="http://www.auto.tuwien.ac.at/~mkoegler/eib/xml/appinfo.xsd" match="ai:DeviceDesc">
24 <xsl:element name="DeviceConfig">
25 <xsl:attribute name="version">
26 <xsl:value-of select="@version"/>
27 </xsl:attribute>
28 <xsl:attribute name="xmlns">http://www.auto.tuwien.ac.at/~mkoegler/eib/xml/configdesc.xsd</xsl:attribute>
29 <xsl:attribute namespace="http://www.w3.org/2001/XMLSchema-instance" name="schemaLocation">http://www.auto.tuwien.ac.at/~mkoegler/eib/xml/configdesc.xsd</xsl:attribute>
30 <ProgramID>
31 <xsl:value-of select="ai:ProgramID"/>
32 </ProgramID>
33 <PhysicalAddress>0.0.0</PhysicalAddress>
34 <InstallKey>00000000</InstallKey>
35 <Key id="1">00000000</Key>
36 <xsl:for-each select="ai:GroupObject">
37 <xsl:element name="GroupObject">
38 <xsl:attribute name="id">
39 <xsl:value-of select="@id"/>
40 </xsl:attribute>
41 <xsl:comment>
42 <xsl:value-of select="ai:Title"/>
43 </xsl:comment>
44 <Priority>low</Priority>
45 <SendAddress>0/0/0</SendAddress>
46 <ReadRequestAddress>0/0/0</ReadRequestAddress>
47 <ReceiveAddress>
48 <GroupAddr>0/0/0</GroupAddr>
49 </ReceiveAddress>
50 <ReadAddress>
51 <GroupAddr>0/0/0</GroupAddr>
52 </ReadAddress>
53 <UpdateAddress>
54 <GroupAddr>0/0/0</GroupAddr>
55 </UpdateAddress>
56 </xsl:element>
57 </xsl:for-each>
58 <xsl:for-each select="ai:Property">
59 <xsl:element name="Property">
60 <xsl:attribute name="id">
61 <xsl:value-of select="@id"/>
62 </xsl:attribute>
63 <xsl:comment>
64 <xsl:value-of select="ai:Title"/>
65 </xsl:comment>
66 <Disable>false</Disable>
67 <ReadOnly>false</ReadOnly>
68 <ReadAccess>1</ReadAccess>
69 <WriteAccess>1</WriteAccess>
70 </xsl:element>
71 </xsl:for-each>
72 <xsl:for-each select="ai:PollingSlave">
73 <xsl:element name="PollingSlave">
74 <xsl:attribute name="id">
75 <xsl:value-of select="@id"/>
76 </xsl:attribute>
77 <xsl:comment>
78 <xsl:value-of select="ai:Title"/>
79 </xsl:comment>
80 <PollingAddress>0000</PollingAddress>
81 <PollingSlot>0</PollingSlot>
82 </xsl:element>
83 </xsl:for-each>
84 <xsl:for-each select="ai:PollingMaster">
85 <xsl:element name="PollingMaster">
86 <xsl:attribute name="id">
87 <xsl:value-of select="@id"/>
88 </xsl:attribute>
89 <xsl:comment>
90 <xsl:value-of select="ai:Title"/>
91 </xsl:comment>
92 <PollingAddress>0000</PollingAddress>
93 <PollingCount>0</PollingCount>
94 </xsl:element>
95 </xsl:for-each>
96 <xsl:for-each select="ai:Parameter">
97 <Parameter>
98 <xsl:for-each select="ai:ListParameter">
99 <xsl:element name="ListParameter">
100 <xsl:attribute name="id">
101 <xsl:value-of select="@id"/>
102 </xsl:attribute>
103 <xsl:comment>
104 <xsl:value-of select="ai:Title"/>
105 </xsl:comment>
106 <Value>
107 <xsl:value-of select="ai:ListDefault/@idref"/>
108 </Value>
109 </xsl:element>
110 </xsl:for-each>
111 <xsl:for-each select="ai:IntParameter">
112 <xsl:element name="IntParameter">
113 <xsl:attribute name="id">
114 <xsl:value-of select="@id"/>
115 </xsl:attribute>
116 <xsl:comment>
117 <xsl:value-of select="ai:Title"/>
118 </xsl:comment>
119 <Value>
120 <xsl:value-of select="ai:Default"/>
121 </Value>
122 </xsl:element>
123 </xsl:for-each>
124 <xsl:for-each select="ai:FloatParameter">
125 <xsl:element name="FloatParameter">
126 <xsl:attribute name="id">
127 <xsl:value-of select="@id"/>
128 </xsl:attribute>
129 <xsl:comment>
130 <xsl:value-of select="ai:Title"/>
131 </xsl:comment>
132 <Value>
133 <xsl:value-of select="ai:Default"/>
134 </Value>
135 </xsl:element>
136 </xsl:for-each>
137 <xsl:for-each select="ai:StringParameter">
138 <xsl:element name="StringParameter">
139 <xsl:attribute name="id">
140 <xsl:value-of select="@id"/>
141 </xsl:attribute>
142 <xsl:comment>
143 <xsl:value-of select="ai:Title"/>
144 </xsl:comment>
145 <Value>
146 <xsl:value-of select="ai:Default"/>
147 </Value>
148 </xsl:element>
149 </xsl:for-each>
150 </Parameter>
151 </xsl:for-each>
152 </xsl:element>
153 </xsl:template>
154 </xsl:transform>