author | Laurent Bessard |
Mon, 09 Sep 2013 23:36:51 +0200 | |
changeset 1309 | 85ce56758900 |
parent 1308 | ad61268dbdb6 |
child 1317 | 177d7cd76a3e |
permissions | -rw-r--r-- |
1308
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
1 |
<xsl:stylesheet version="1.0" |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
2 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
3 |
xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
4 |
xmlns:xhtml="http://www.w3.org/1999/xhtml" |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
5 |
xmlns:ns="var_infos_ns" |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
6 |
extension-element-prefixes="ns" |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
7 |
exclude-result-prefixes="ns"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
8 |
<xsl:template match="ppx:returnType"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
9 |
<ReturnType> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
10 |
<Type><xsl:apply-templates/></Type> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
11 |
<Tree><xsl:apply-templates mode="var_tree"/></Tree> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
12 |
</ReturnType> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
13 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
14 |
<xsl:template match="ppx:localVars"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
15 |
<xsl:call-template name="variables_infos"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
16 |
<xsl:with-param name="var_class" select="'Local'"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
17 |
</xsl:call-template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
18 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
19 |
<xsl:template match="ppx:globalVars"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
20 |
<xsl:call-template name="variables_infos"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
21 |
<xsl:with-param name="var_class" select="'Global'"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
22 |
</xsl:call-template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
23 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
24 |
<xsl:template match="ppx:externalVars"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
25 |
<xsl:call-template name="variables_infos"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
26 |
<xsl:with-param name="var_class" select="'External'"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
27 |
</xsl:call-template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
28 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
29 |
<xsl:template match="ppx:tempVars"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
30 |
<xsl:call-template name="variables_infos"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
31 |
<xsl:with-param name="var_class" select="'Temp'"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
32 |
</xsl:call-template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
33 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
34 |
<xsl:template match="ppx:inputVars"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
35 |
<xsl:call-template name="variables_infos"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
36 |
<xsl:with-param name="var_class" select="'Input'"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
37 |
</xsl:call-template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
38 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
39 |
<xsl:template match="ppx:outputVars"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
40 |
<xsl:call-template name="variables_infos"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
41 |
<xsl:with-param name="var_class" select="'Output'"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
42 |
</xsl:call-template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
43 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
44 |
<xsl:template match="inOutVars"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
45 |
<xsl:call-template name="variables_infos"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
46 |
<xsl:with-param name="var_class" select="'InOut'"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
47 |
</xsl:call-template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
48 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
49 |
<xsl:template name="variables_infos"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
50 |
<xsl:param name="var_class"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
51 |
<xsl:variable name="var_option"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
52 |
<xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
53 |
<xsl:when test="@constant='true' or @constant='1'"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
54 |
<xsl:text>Constant</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
55 |
</xsl:when> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
56 |
<xsl:when test="@retain='true' or @retain='1'"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
57 |
<xsl:text>Retain</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
58 |
</xsl:when> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
59 |
<xsl:when test="@nonretain='true' or @nonretain='1'"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
60 |
<xsl:text>Non-Retain</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
61 |
</xsl:when> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
62 |
</xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
63 |
</xsl:variable> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
64 |
<xsl:for-each select="ppx:variable"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
65 |
<ns:add_variable> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
66 |
<Name><xsl:value-of select="@name"/></Name> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
67 |
<Class><xsl:value-of select="$var_class"/></Class> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
68 |
<Type><xsl:apply-templates select="ppx:type"/></Type> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
69 |
<Option><xsl:value-of select="$var_option"/></Option> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
70 |
<Location><xsl:value-of select="@address"/></Location> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
71 |
<Initial_Value><xsl:apply-templates select="ppx:initialValue"/></Initial_Value> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
72 |
<Edit/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
73 |
<Tree><xsl:apply-templates select="ppx:type" mode="var_tree"/></Tree> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
74 |
<Documentation> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
75 |
<xsl:value-of select="ppx:documentation/xhtml:p/text()"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
76 |
</Documentation> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
77 |
</ns:add_variable> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
78 |
</xsl:for-each> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
79 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
80 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
81 |
<xsl:value-of select="@name"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
82 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
83 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
84 |
<array> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
85 |
<xsl:apply-templates select="ppx:baseType"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
86 |
<xsl:for-each select="ppx:dimension"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
87 |
<dimension> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
88 |
<xsl:attribute name="lower"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
89 |
<xsl:value-of select="@lower"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
90 |
</xsl:attribute> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
91 |
<xsl:attribute name="upper"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
92 |
<xsl:value-of select="@upper"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
93 |
</xsl:attribute> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
94 |
</dimension> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
95 |
</xsl:for-each> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
96 |
</array> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
97 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
98 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
99 |
<xsl:text>STRING</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
100 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
101 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
102 |
<xsl:text>WSTRING</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
103 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
104 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
105 |
<xsl:value-of select="local-name()"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
106 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
107 |
<xsl:template match="ppx:initialValue"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
108 |
<xsl:apply-templates/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
109 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
110 |
<xsl:template match="ppx:value"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
111 |
<xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
112 |
<xsl:when test="@repetitionValue"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
113 |
<xsl:value-of select="@repetitionValue"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
114 |
<xsl:text>(</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
115 |
<xsl:apply-templates/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
116 |
<xsl:text>)</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
117 |
</xsl:when> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
118 |
<xsl:when test="@member"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
119 |
<xsl:value-of select="@member"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
120 |
<xsl:text> := </xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
121 |
<xsl:apply-templates/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
122 |
</xsl:when> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
123 |
<xsl:otherwise> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
124 |
<xsl:apply-templates/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
125 |
</xsl:otherwise> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
126 |
</xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
127 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
128 |
<xsl:template match="ppx:simpleValue"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
129 |
<xsl:value-of select="@value"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
130 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
131 |
<xsl:template match="ppx:arrayValue"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
132 |
<xsl:text>[</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
133 |
<xsl:for-each select="ppx:value"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
134 |
<xsl:apply-templates select="."/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
135 |
<xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
136 |
<xsl:when test="position()!=last()"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
137 |
<xsl:text>, </xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
138 |
</xsl:when> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
139 |
</xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
140 |
</xsl:for-each> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
141 |
<xsl:text>]</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
142 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
143 |
<xsl:template match="ppx:structValue"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
144 |
<xsl:text>(</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
145 |
<xsl:for-each select="ppx:value"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
146 |
<xsl:apply-templates select="."/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
147 |
<xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
148 |
<xsl:when test="position()!=last()"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
149 |
<xsl:text>, </xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
150 |
</xsl:when> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
151 |
</xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
152 |
</xsl:for-each> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
153 |
<xsl:text>)</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
154 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
155 |
<xsl:template match="ppx:pou" mode="var_tree"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
156 |
<xsl:apply-templates select="ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable" mode="var_tree"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
157 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
158 |
<xsl:template match="ppx:variable" mode="var_tree"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
159 |
<var> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
160 |
<xsl:attribute name="name"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
161 |
<xsl:value-of select="@name"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
162 |
</xsl:attribute> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
163 |
<xsl:apply-templates select="ppx:type" mode="var_tree"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
164 |
</var> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
165 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
166 |
<xsl:template match="ppx:dataType"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
167 |
<xsl:apply-templates select="ppx:baseType" mode="var_tree"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
168 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
169 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct" mode="var_tree"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
170 |
<xsl:apply-templates select="ppx:variable" mode="var_tree"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
171 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
172 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived" mode="var_tree"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
173 |
<ns:var_tree/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
174 |
<xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
175 |
<xsl:when test="count(./*) > 0"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
176 |
<xsl:apply-templates mode="var_tree"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
177 |
</xsl:when> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
178 |
<xsl:otherwise> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
179 |
<xsl:value-of select="@name"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
180 |
</xsl:otherwise> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
181 |
</xsl:choose> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
182 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
183 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array" mode="var_tree"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
184 |
<xsl:apply-templates select="ppx:baseType" mode="var_tree"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
185 |
<xsl:for-each select="ppx:dimension"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
186 |
<dimension> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
187 |
<xsl:attribute name="lower"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
188 |
<xsl:value-of select="@lower"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
189 |
</xsl:attribute> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
190 |
<xsl:attribute name="upper"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
191 |
<xsl:value-of select="@upper"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
192 |
</xsl:attribute> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
193 |
</dimension> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
194 |
</xsl:for-each> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
195 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
196 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string" mode="var_tree"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
197 |
<xsl:text>STRING</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
198 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
199 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring" mode="var_tree"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
200 |
<xsl:text>WSTRING</xsl:text> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
201 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
202 |
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*" mode="var_tree"> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
203 |
<xsl:value-of select="local-name()"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
204 |
</xsl:template> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
205 |
<xsl:template match="text()"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
206 |
<xsl:template match="text()" mode="var_tree"/> |
ad61268dbdb6
Replaced old pou variable list and variable tree generating by xslt stylesheet
Laurent Bessard
parents:
diff
changeset
|
207 |
</xsl:stylesheet> |