1 <?xml version=
"1.0" encoding=
"utf-8"?>
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.
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"/>
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>
31 <xsl:value-of select=
"ai: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"/>
42 <xsl:value-of select=
"ai:Title"/>
44 <Priority>low
</Priority>
45 <SendAddress>0/
0/
0</SendAddress>
46 <ReadRequestAddress>0/
0/
0</ReadRequestAddress>
48 <GroupAddr>0/
0/
0</GroupAddr>
51 <GroupAddr>0/
0/
0</GroupAddr>
54 <GroupAddr>0/
0/
0</GroupAddr>
58 <xsl:for-each select=
"ai:Property">
59 <xsl:element name=
"Property">
60 <xsl:attribute name=
"id">
61 <xsl:value-of select=
"@id"/>
64 <xsl:value-of select=
"ai:Title"/>
66 <Disable>false
</Disable>
67 <ReadOnly>false
</ReadOnly>
68 <ReadAccess>1</ReadAccess>
69 <WriteAccess>1</WriteAccess>
72 <xsl:for-each select=
"ai:PollingSlave">
73 <xsl:element name=
"PollingSlave">
74 <xsl:attribute name=
"id">
75 <xsl:value-of select=
"@id"/>
78 <xsl:value-of select=
"ai:Title"/>
80 <PollingAddress>0000</PollingAddress>
81 <PollingSlot>0</PollingSlot>
84 <xsl:for-each select=
"ai:PollingMaster">
85 <xsl:element name=
"PollingMaster">
86 <xsl:attribute name=
"id">
87 <xsl:value-of select=
"@id"/>
90 <xsl:value-of select=
"ai:Title"/>
92 <PollingAddress>0000</PollingAddress>
93 <PollingCount>0</PollingCount>
96 <xsl:for-each select=
"ai:Parameter">
98 <xsl:for-each select=
"ai:ListParameter">
99 <xsl:element name=
"ListParameter">
100 <xsl:attribute name=
"id">
101 <xsl:value-of select=
"@id"/>
104 <xsl:value-of select=
"ai:Title"/>
107 <xsl:value-of select=
"ai:ListDefault/@idref"/>
111 <xsl:for-each select=
"ai:IntParameter">
112 <xsl:element name=
"IntParameter">
113 <xsl:attribute name=
"id">
114 <xsl:value-of select=
"@id"/>
117 <xsl:value-of select=
"ai:Title"/>
120 <xsl:value-of select=
"ai:Default"/>
124 <xsl:for-each select=
"ai:FloatParameter">
125 <xsl:element name=
"FloatParameter">
126 <xsl:attribute name=
"id">
127 <xsl:value-of select=
"@id"/>
130 <xsl:value-of select=
"ai:Title"/>
133 <xsl:value-of select=
"ai:Default"/>
137 <xsl:for-each select=
"ai:StringParameter">
138 <xsl:element name=
"StringParameter">
139 <xsl:attribute name=
"id">
140 <xsl:value-of select=
"@id"/>
143 <xsl:value-of select=
"ai:Title"/>
146 <xsl:value-of select=
"ai:Default"/>