author | Laurent Bessard |
Thu, 10 Oct 2013 09:44:13 +0200 | |
changeset 1352 | 9ec4ac8e2955 |
parent 1347 | 533741e5075c |
child 1359 | cce13b237b07 |
permissions | -rw-r--r-- |
1347
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
1 |
include yslt.yml2 |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
2 |
estylesheet xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
3 |
xmlns:xhtml="http://www.w3.org/1999/xhtml" |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
4 |
xmlns:ns="var_infos_ns" |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
5 |
extension-element-prefixes="ns" |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
6 |
exclude-result-prefixes="ns" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
7 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
8 |
param "tree"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
9 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
10 |
template "text()"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
11 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
12 |
variable "project" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
13 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
14 |
when "$tree='True'" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
15 |
copy "document('project')/project/*"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
16 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
17 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
18 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
19 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
20 |
variable "stdlib" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
21 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
22 |
when "$tree='True'" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
23 |
copy "document('stdlib')/stdlib/*"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
24 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
25 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
26 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
27 |
variable "extensions" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
28 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
29 |
when "$tree='True'" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
30 |
copy "document('extensions')/extensions/*"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
31 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
32 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
33 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
34 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
35 |
template "ppx:returnType" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
36 |
value "ns:AddTree()"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
37 |
apply; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
38 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
39 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
40 |
function "variables_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
41 |
param "var_class"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
42 |
variable "var_option" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
43 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
44 |
when "@constant='true' or @constant='1'" > Constant |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
45 |
when "@retain='true' or @retain='1'" > Retain |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
46 |
when "@nonretain='true' or @nonretain='1'" > Non-Retain |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
47 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
48 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
49 |
foreach "ppx:variable" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
50 |
variable "initial_value" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
51 |
apply "ppx:initialValue"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
52 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
53 |
variable "edit" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
54 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
55 |
when "$var_class='Global' or $var_class='External'" > true |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
56 |
otherwise { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
57 |
apply "ppx:type", mode="var_edit"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
58 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
59 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
60 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
61 |
value "ns:AddTree()"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
62 |
apply "ppx:type"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
63 |
value "ns:AddVariable(@name, $var_class, $var_option, @address, $initial_value, $edit, ppx:documentation/xhtml:p/text())"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
64 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
65 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
66 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
67 |
template "ppx:localVars" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
68 |
call "variables_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
69 |
with "var_class" > Local |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
70 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
71 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
72 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
73 |
template "ppx:globalVars" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
74 |
call "variables_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
75 |
with "var_class" > Global |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
76 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
77 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
78 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
79 |
template "ppx:externalVars" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
80 |
call "variables_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
81 |
with "var_class" > External |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
82 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
83 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
84 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
85 |
template "ppx:tempVars" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
86 |
call "variables_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
87 |
with "var_class" > Temp |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
88 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
89 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
90 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
91 |
template "ppx:inputVars" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
92 |
call "variables_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
93 |
with "var_class" > Input |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
94 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
95 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
96 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
97 |
template "ppx:outputVars" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
98 |
call "variables_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
99 |
with "var_class" > Output |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
100 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
101 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
102 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
103 |
template "ppx:inOutVars" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
104 |
call "variables_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
105 |
with "var_class" > InOut |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
106 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
107 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
108 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
109 |
template "ppx:pou" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
110 |
apply "ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
111 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
112 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
113 |
template "ppx:variable" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
114 |
variable "name" > «@name» |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
115 |
value "ns:AddTree($name)"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
116 |
apply "ppx:type"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
117 |
value "ns:AddVarToTree($name)"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
118 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
119 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
120 |
template "ppx:dataType" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
121 |
apply "ppx:baseType"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
122 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
123 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
124 |
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
125 |
apply "ppx:variable"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
126 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
127 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
128 |
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
129 |
variable "type_name" > «@name» |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
130 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
131 |
when "$tree='True'" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
132 |
apply """exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
133 |
exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
134 |
exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
135 |
exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
136 |
exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
137 |
exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]"""; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
138 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
139 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
140 |
value "ns:SetType($type_name)"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
141 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
142 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
143 |
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
144 |
apply "ppx:baseType"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
145 |
foreach "ppx:dimension" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
146 |
value "ns:AddDimension(@lower, @upper)"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
147 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
148 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
149 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
150 |
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
151 |
variable "name" > STRING |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
152 |
value "ns:SetType($name)"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
153 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
154 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
155 |
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
156 |
variable "name" > WSTRING |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
157 |
value "ns:SetType($name)"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
158 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
159 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
160 |
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
161 |
variable "name" > «local-name()» |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
162 |
value "ns:SetType($name)"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
163 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
164 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
165 |
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived", mode="var_edit" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
166 |
variable "type_name", "@name"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
167 |
variable "pou_infos" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
168 |
copy """exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
169 |
exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
170 |
exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]"""; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
171 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
172 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
173 |
when "$pou_infos != ''" > false |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
174 |
otherwise > true |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
175 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
176 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
177 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
178 |
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*", mode="var_edit" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
179 |
> true |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
180 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
181 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
182 |
template "ppx:value" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
183 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
184 |
when "@repetitionValue" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
185 |
> «@repetitionValue»( |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
186 |
apply; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
187 |
> ) |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
188 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
189 |
when "@member" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
190 |
> «@member» := |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
191 |
apply; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
192 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
193 |
otherwise { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
194 |
apply; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
195 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
196 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
197 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
198 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
199 |
template "ppx:simpleValue" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
200 |
> «@value» |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
201 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
202 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
203 |
function "complex_type_value" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
204 |
param "start_bracket"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
205 |
param "end_bracket"; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
206 |
> «@start_bracket» |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
207 |
foreach "ppx:value" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
208 |
apply "."; |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
209 |
choose { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
210 |
when "position()!=last()" > , |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
211 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
212 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
213 |
> «@end_bracket» |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
214 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
215 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
216 |
template "ppx:arrayValue" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
217 |
call "complex_type_value" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
218 |
with "start_bracket" > [ |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
219 |
with "end_bracket" > ] |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
220 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
221 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
222 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
223 |
template "ppx:structValue" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
224 |
call "complex_type_value" { |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
225 |
with "start_bracket" > ( |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
226 |
with "end_bracket" > ) |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
227 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
228 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
229 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
230 |
} |
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
231 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
232 |
|
533741e5075c
Fixed pou variables information loading stylesheet
Laurent Bessard
parents:
diff
changeset
|
233 |