equal
deleted
inserted
replaced
1 include yslt_noindent.yml2 |
1 include yslt_noindent.yml2 |
2 istylesheet xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" |
2 istylesheet xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" |
3 xmlns:xhtml="http://www.w3.org/1999/xhtml" |
3 xmlns:xhtml="http://www.w3.org/1999/xhtml" |
4 xmlns:ns="var_infos_ns" |
4 xmlns:ns="beremiz" |
5 extension-element-prefixes="ns" |
5 extension-element-prefixes="ns" |
6 exclude-result-prefixes="ns" { |
6 exclude-result-prefixes="ns" { |
7 |
7 |
8 param "tree"; |
8 param "tree"; |
9 |
9 |
10 template "text()"; |
10 template "text()"; |
11 |
11 |
12 variable "project" { |
12 variable "project", "ns:GetProject()"; |
13 copy "document('project')/project/*"; |
13 |
14 } |
14 variable "stdlib", "ns:GetStdLibs()"; |
15 |
15 |
16 variable "stdlib" { |
16 variable "extensions", "ns:GetExtensions()"; |
17 copy "document('stdlib')/stdlib/*"; |
17 |
18 } |
18 variable "all_types", "($project | $stdlib | $extensions)/ppx:types"; |
19 variable "extensions" { |
19 |
20 copy "document('extensions')/extensions/*"; |
|
21 } |
|
22 |
|
23 template "ppx:configuration" { |
20 template "ppx:configuration" { |
24 apply "ppx:globalVars"; |
21 apply "ppx:globalVars"; |
25 } |
22 } |
26 |
23 |
27 template "ppx:resource" { |
24 template "ppx:resource" { |
127 |
124 |
128 template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived", mode="var_type" { |
125 template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived", mode="var_type" { |
129 variable "type_name" > «@name» |
126 variable "type_name" > «@name» |
130 choose { |
127 choose { |
131 when "$tree='True'" { |
128 when "$tree='True'" { |
132 apply """exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
129 apply """$all_types/ppx:pous/ppx:pou[@name=$type_name] | \ |
133 exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | |
130 $all_types/ppx:dataTypes/ppx:dataType[@name=$type_name]""", mode="var_type"; |
134 exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
|
135 exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | |
|
136 exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
|
137 exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]""", mode="var_type"; |
|
138 } |
131 } |
139 } |
132 } |
140 value "ns:SetType($type_name)"; |
133 value "ns:SetType($type_name)"; |
141 } |
134 } |
142 |
135 |
164 value "ns:SetType($name)"; |
157 value "ns:SetType($name)"; |
165 } |
158 } |
166 |
159 |
167 template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived", mode="var_edit" { |
160 template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived", mode="var_edit" { |
168 variable "type_name" > «@name» |
161 variable "type_name" > «@name» |
169 variable "pou_infos" { |
162 variable "pou_infos", "$all_types/ppx:pous/ppx:pou[@name=$type_name]"; |
170 copy """exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
|
171 exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
|
172 exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]"""; |
|
173 } |
|
174 choose { |
163 choose { |
175 when "$pou_infos != ''" > false |
164 when "$pou_infos != ''" > false |
176 otherwise > true |
165 otherwise > true |
177 } |
166 } |
178 } |
167 } |