author | Laurent Bessard |
Wed, 09 Oct 2013 10:57:20 +0200 | |
changeset 1347 | 533741e5075c |
parent 1326 | e2c11668addf |
child 1351 | a546a63ce1bf |
permissions | -rw-r--r-- |
1321
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
1 |
<xsl:stylesheet version="1.0" |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
2 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
3 |
xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
4 |
xmlns:xhtml="http://www.w3.org/1999/xhtml" |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
5 |
xmlns:ns="instance_tagname_ns" |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
6 |
extension-element-prefixes="ns" |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
7 |
exclude-result-prefixes="ns"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
8 |
<xsl:param name="instance_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
9 |
<xsl:template name="element_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
10 |
<xsl:param name="path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
11 |
<xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
12 |
<xsl:when test="contains($path,'.')"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
13 |
<xsl:value-of select="substring-before($path,'.')"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
14 |
</xsl:when> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
15 |
<xsl:otherwise> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
16 |
<xsl:value-of select="$path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
17 |
</xsl:otherwise> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
18 |
</xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
19 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
20 |
<xsl:template name="next_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
21 |
<xsl:param name="path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
22 |
<xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
23 |
<xsl:when test="contains($path,'.')"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
24 |
<xsl:value-of select="substring-after($path,'.')"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
25 |
</xsl:when> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
26 |
</xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
27 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
28 |
<xsl:template match="ppx:project"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
29 |
<xsl:variable name="config_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
30 |
<xsl:call-template name="element_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
31 |
<xsl:with-param name="path" select="$instance_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
32 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
33 |
</xsl:variable> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
34 |
<xsl:apply-templates select="ppx:instances/ppx:configurations/ppx:configuration[@name=$config_name]"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
35 |
<xsl:with-param name="element_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
36 |
<xsl:call-template name="next_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
37 |
<xsl:with-param name="path" select="$instance_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
38 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
39 |
</xsl:with-param> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
40 |
</xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
41 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
42 |
<xsl:template match="ppx:configuration"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
43 |
<xsl:param name="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
44 |
<xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
45 |
<xsl:when test="$element_path!=''"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
46 |
<xsl:variable name="child_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
47 |
<xsl:call-template name="element_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
48 |
<xsl:with-param name="path" select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
49 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
50 |
</xsl:variable> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
51 |
<xsl:apply-templates select="ppx:resource[@name=$child_name] | ppx:globalVars/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
52 |
<xsl:with-param name="element_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
53 |
<xsl:call-template name="next_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
54 |
<xsl:with-param name="path" select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
55 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
56 |
</xsl:with-param> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
57 |
</xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
58 |
</xsl:when> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
59 |
<xsl:otherwise> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
60 |
<ns:config_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
61 |
<xsl:attribute name="name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
62 |
<xsl:value-of select="@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
63 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
64 |
</ns:config_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
65 |
</xsl:otherwise> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
66 |
</xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
67 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
68 |
<xsl:template match="ppx:resource"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
69 |
<xsl:param name="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
70 |
<xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
71 |
<xsl:when test="$element_path!=''"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
72 |
<xsl:variable name="child_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
73 |
<xsl:call-template name="element_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
74 |
<xsl:with-param name="path" select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
75 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
76 |
</xsl:variable> |
1326
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
77 |
<xsl:apply-templates select="ppx:pouInstance[@name=$child_name] | ppx:task/ppx:pouInstance[@name=$child_name] | ppx:globalVars/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]"> |
1321
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
78 |
<xsl:with-param name="element_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
79 |
<xsl:call-template name="next_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
80 |
<xsl:with-param name="path" select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
81 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
82 |
</xsl:with-param> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
83 |
</xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
84 |
</xsl:when> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
85 |
<xsl:otherwise> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
86 |
<ns:resource_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
87 |
<xsl:attribute name="name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
88 |
<xsl:value-of select="@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
89 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
90 |
<xsl:attribute name="config_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
91 |
<xsl:value-of select="ancestor::ppx:configuration/@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
92 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
93 |
</ns:resource_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
94 |
</xsl:otherwise> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
95 |
</xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
96 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
97 |
<xsl:template match="ppx:pouInstance"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
98 |
<xsl:param name="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
99 |
<ns:instance_definition> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
100 |
<xsl:attribute name="name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
101 |
<xsl:value-of select="@typeName"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
102 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
103 |
<xsl:attribute name="path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
104 |
<xsl:value-of select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
105 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
106 |
</ns:instance_definition> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
107 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
108 |
<xsl:template match="ppx:pou"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
109 |
<xsl:param name="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
110 |
<xsl:variable name="child_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
111 |
<xsl:call-template name="element_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
112 |
<xsl:with-param name="path" select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
113 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
114 |
</xsl:variable> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
115 |
<xsl:apply-templates select="ppx:interface/*/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]"> |
1326
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
116 |
<xsl:with-param name="element_path"> |
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
117 |
<xsl:call-template name="next_path"> |
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
118 |
<xsl:with-param name="path" select="$element_path"/> |
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
119 |
</xsl:call-template> |
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
120 |
</xsl:with-param> |
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
121 |
</xsl:apply-templates> |
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
122 |
<xsl:apply-templates select="ppx:actions/ppx:action[@name=$child_name]"/> |
e2c11668addf
Fixed instance type tagname computing xslt stylesheet
Laurent Bessard
parents:
1321
diff
changeset
|
123 |
<xsl:apply-templates select="ppx:transitions/ppx:transition[@name=$child_name]"/> |
1321
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
124 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
125 |
<xsl:template match="ppx:action"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
126 |
<ns:action_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
127 |
<xsl:attribute name="name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
128 |
<xsl:value-of select="@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
129 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
130 |
<xsl:attribute name="pou_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
131 |
<xsl:value-of select="ancestor::ppx:pou/@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
132 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
133 |
</ns:action_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
134 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
135 |
<xsl:template match="ppx:transition"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
136 |
<ns:transition_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
137 |
<xsl:attribute name="name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
138 |
<xsl:value-of select="@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
139 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
140 |
<xsl:attribute name="pou_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
141 |
<xsl:value-of select="ancestor::ppx:pou/@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
142 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
143 |
</ns:transition_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
144 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
145 |
<xsl:template name="ppx:dataType"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
146 |
<xsl:param name="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
147 |
<xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
148 |
<xsl:with-param name="element_path" select="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
149 |
</xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
150 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
151 |
<xsl:template match="ppx:derived"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
152 |
<xsl:param name="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
153 |
<ns:instance_definition> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
154 |
<xsl:attribute name="name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
155 |
<xsl:value-of select="@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
156 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
157 |
<xsl:attribute name="path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
158 |
<xsl:value-of select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
159 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
160 |
</ns:instance_definition> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
161 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
162 |
<xsl:template match="array"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
163 |
<xsl:param name="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
164 |
<xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
165 |
<xsl:with-param name="element_path" select="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
166 |
</xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
167 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
168 |
<xsl:template match="struct"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
169 |
<xsl:param name="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
170 |
<xsl:variable name="child_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
171 |
<xsl:call-template name="element_name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
172 |
<xsl:with-param name="path" select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
173 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
174 |
</xsl:variable> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
175 |
<xsl:variable name="next_child_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
176 |
<xsl:call-template name="next_path"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
177 |
<xsl:with-param name="path" select="$element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
178 |
</xsl:call-template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
179 |
</xsl:variable> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
180 |
<xsl:apply-templates select="ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
181 |
<xsl:with-param name="element_path" select="element_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
182 |
</xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
183 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
184 |
<xsl:template match="pou_instance"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
185 |
<xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
186 |
<xsl:when test="@pou_path!=''"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
187 |
<xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
188 |
<xsl:with-param name="element_path" select="@pou_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
189 |
</xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
190 |
</xsl:when> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
191 |
<xsl:otherwise> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
192 |
<ns:pou_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
193 |
<xsl:attribute name="name"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
194 |
<xsl:value-of select="ppx:pou/@name"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
195 |
</xsl:attribute> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
196 |
</ns:pou_tagname> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
197 |
</xsl:otherwise> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
198 |
</xsl:choose> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
199 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
200 |
<xsl:template match="datatype_instance"> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
201 |
<xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
202 |
<xsl:with-param name="element_path" select="@datatype_path"/> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
203 |
</xsl:apply-templates> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
204 |
</xsl:template> |
83f41ea00b97
Replaced old pou instance type tagname computing by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
205 |
</xsl:stylesheet> |