26 <xsl:when test="$tree='True'"> |
26 <xsl:when test="$tree='True'"> |
27 <xsl:copy-of select="document('extensions')/extensions/*"/> |
27 <xsl:copy-of select="document('extensions')/extensions/*"/> |
28 </xsl:when> |
28 </xsl:when> |
29 </xsl:choose> |
29 </xsl:choose> |
30 </xsl:variable> |
30 </xsl:variable> |
|
31 <xsl:template match="ppx:configuration"> |
|
32 <xsl:param name="_indent" select="0"/> |
|
33 <xsl:apply-templates select="ppx:globalVars"> |
|
34 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
|
35 </xsl:apply-templates> |
|
36 </xsl:template> |
|
37 <xsl:template match="ppx:resource"> |
|
38 <xsl:param name="_indent" select="0"/> |
|
39 <xsl:apply-templates select="ppx:globalVars"> |
|
40 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
|
41 </xsl:apply-templates> |
|
42 </xsl:template> |
|
43 <xsl:template match="ppx:pou"> |
|
44 <xsl:param name="_indent" select="0"/> |
|
45 <xsl:apply-templates select="ppx:interface/*"> |
|
46 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
|
47 </xsl:apply-templates> |
|
48 </xsl:template> |
31 <xsl:template match="ppx:returnType"> |
49 <xsl:template match="ppx:returnType"> |
32 <xsl:param name="_indent" select="0"/> |
50 <xsl:param name="_indent" select="0"/> |
33 <xsl:value-of select="ns:AddTree()"/> |
51 <xsl:value-of select="ns:AddTree()"/> |
34 <xsl:apply-templates> |
52 <xsl:apply-templates mode="var_type" select="."> |
35 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
53 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
36 </xsl:apply-templates> |
54 </xsl:apply-templates> |
37 </xsl:template> |
55 </xsl:template> |
38 <xsl:template name="variables_infos"> |
56 <xsl:template name="variables_infos"> |
39 <xsl:param name="_indent" select="0"/> |
57 <xsl:param name="_indent" select="0"/> |
130 <xsl:with-param name="var_class"> |
148 <xsl:with-param name="var_class"> |
131 <xsl:text>InOut</xsl:text> |
149 <xsl:text>InOut</xsl:text> |
132 </xsl:with-param> |
150 </xsl:with-param> |
133 </xsl:call-template> |
151 </xsl:call-template> |
134 </xsl:template> |
152 </xsl:template> |
135 <xsl:template match="ppx:pou"> |
153 <xsl:template mode="var_type" match="ppx:pou"> |
136 <xsl:param name="_indent" select="0"/> |
154 <xsl:param name="_indent" select="0"/> |
137 <xsl:apply-templates select="ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable"> |
155 <xsl:apply-templates mode="var_type" select="ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable"> |
138 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
156 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
139 </xsl:apply-templates> |
157 </xsl:apply-templates> |
140 </xsl:template> |
158 </xsl:template> |
141 <xsl:template match="ppx:variable"> |
159 <xsl:template mode="var_type" match="ppx:variable"> |
142 <xsl:param name="_indent" select="0"/> |
160 <xsl:param name="_indent" select="0"/> |
143 <xsl:variable name="name"> |
161 <xsl:variable name="name"> |
144 <xsl:value-of select="@name"/> |
162 <xsl:value-of select="@name"/> |
145 </xsl:variable> |
163 </xsl:variable> |
146 <xsl:value-of select="ns:AddTree($name)"/> |
164 <xsl:value-of select="ns:AddTree($name)"/> |
147 <xsl:apply-templates select="ppx:type"> |
165 <xsl:apply-templates mode="var_type" select="ppx:type"> |
148 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
166 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
149 </xsl:apply-templates> |
167 </xsl:apply-templates> |
150 <xsl:value-of select="ns:AddVarToTree($name)"/> |
168 <xsl:value-of select="ns:AddVarToTree($name)"/> |
151 </xsl:template> |
169 </xsl:template> |
152 <xsl:template match="ppx:dataType"> |
170 <xsl:template mode="var_type" match="ppx:dataType"> |
153 <xsl:param name="_indent" select="0"/> |
171 <xsl:param name="_indent" select="0"/> |
154 <xsl:apply-templates select="ppx:baseType"> |
172 <xsl:apply-templates mode="var_type" select="ppx:baseType"> |
155 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
173 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
156 </xsl:apply-templates> |
174 </xsl:apply-templates> |
157 </xsl:template> |
175 </xsl:template> |
158 <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct"> |
176 <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct"> |
159 <xsl:param name="_indent" select="0"/> |
177 <xsl:param name="_indent" select="0"/> |
160 <xsl:apply-templates select="ppx:variable"> |
178 <xsl:apply-templates mode="var_type" select="ppx:variable"> |
161 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
179 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
162 </xsl:apply-templates> |
180 </xsl:apply-templates> |
163 </xsl:template> |
181 </xsl:template> |
164 <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived"> |
182 <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived"> |
165 <xsl:param name="_indent" select="0"/> |
183 <xsl:param name="_indent" select="0"/> |
166 <xsl:variable name="type_name"> |
184 <xsl:variable name="type_name"> |
167 <xsl:value-of select="@name"/> |
185 <xsl:value-of select="@name"/> |
168 </xsl:variable> |
186 </xsl:variable> |
169 <xsl:choose> |
187 <xsl:choose> |
170 <xsl:when test="$tree='True'"> |
188 <xsl:when test="$tree='True'"> |
171 <xsl:apply-templates select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]"> |
189 <xsl:apply-templates mode="var_type" select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]"> |
172 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
190 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
173 </xsl:apply-templates> |
191 </xsl:apply-templates> |
174 </xsl:when> |
192 </xsl:when> |
175 </xsl:choose> |
193 </xsl:choose> |
176 <xsl:value-of select="ns:SetType($type_name)"/> |
194 <xsl:value-of select="ns:SetType($type_name)"/> |
177 </xsl:template> |
195 </xsl:template> |
178 <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array"> |
196 <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array"> |
179 <xsl:param name="_indent" select="0"/> |
197 <xsl:param name="_indent" select="0"/> |
180 <xsl:apply-templates select="ppx:baseType"> |
198 <xsl:apply-templates mode="var_type" select="ppx:baseType"> |
181 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
199 <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/> |
182 </xsl:apply-templates> |
200 </xsl:apply-templates> |
183 <xsl:for-each select="ppx:dimension"> |
201 <xsl:for-each select="ppx:dimension"> |
184 <xsl:value-of select="ns:AddDimension(@lower, @upper)"/> |
202 <xsl:value-of select="ns:AddDimension(@lower, @upper)"/> |
185 </xsl:for-each> |
203 </xsl:for-each> |
186 </xsl:template> |
204 </xsl:template> |
187 <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string"> |
205 <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string"> |
188 <xsl:param name="_indent" select="0"/> |
206 <xsl:param name="_indent" select="0"/> |
189 <xsl:variable name="name"> |
207 <xsl:variable name="name"> |
190 <xsl:text>STRING</xsl:text> |
208 <xsl:text>STRING</xsl:text> |
191 </xsl:variable> |
209 </xsl:variable> |
192 <xsl:value-of select="ns:SetType($name)"/> |
210 <xsl:value-of select="ns:SetType($name)"/> |
193 </xsl:template> |
211 </xsl:template> |
194 <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring"> |
212 <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring"> |
195 <xsl:param name="_indent" select="0"/> |
213 <xsl:param name="_indent" select="0"/> |
196 <xsl:variable name="name"> |
214 <xsl:variable name="name"> |
197 <xsl:text>WSTRING</xsl:text> |
215 <xsl:text>WSTRING</xsl:text> |
198 </xsl:variable> |
216 </xsl:variable> |
199 <xsl:value-of select="ns:SetType($name)"/> |
217 <xsl:value-of select="ns:SetType($name)"/> |
200 </xsl:template> |
218 </xsl:template> |
201 <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*"> |
219 <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*"> |
202 <xsl:param name="_indent" select="0"/> |
220 <xsl:param name="_indent" select="0"/> |
203 <xsl:variable name="name"> |
221 <xsl:variable name="name"> |
204 <xsl:value-of select="local-name()"/> |
222 <xsl:value-of select="local-name()"/> |
205 </xsl:variable> |
223 </xsl:variable> |
206 <xsl:value-of select="ns:SetType($name)"/> |
224 <xsl:value-of select="ns:SetType($name)"/> |