Diff of /codesys-ide/scripts/plcopenxml.xslt [df8782] .. [33820c]  Maximize  Restore

Switch to unified view

a/codesys-ide/scripts/plcopenxml.xslt b/codesys-ide/scripts/plcopenxml.xslt
...
...
5
5
6
<!--
6
<!--
7
 | Parse POU start tags
7
 | Parse POU start tags
8
-->
8
-->
9
<xsl:template match="po:pou[@pouType='functionBlock']">
9
<xsl:template match="po:pou[@pouType='functionBlock']">
10
      <xsl:text>---
11
</xsl:text>
12
<!--      <xsl:value-of select="po:interface/po:documentation"/>-->
13
      <xsl:call-template name="trim">
10
      <xsl:call-template name="trim">
14
                 <xsl:with-param name="input" select="po:interface/po:documentation"/>
11
                 <xsl:with-param name="input" select="po:interface/po:documentation"/>
15
          </xsl:call-template>
12
          </xsl:call-template>
16
      <xsl:text>
17
~~~ST
18
</xsl:text>
19
      <xsl:text>FUNCTION_BLOCK </xsl:text><xsl:value-of select="@name" />
13
      <xsl:text>FUNCTION_BLOCK </xsl:text><xsl:value-of select="@name" />
20
      <xsl:apply-templates select="po:interface"/>
14
      <xsl:apply-templates select="po:interface"/>
21
      <xsl:text>
22
~~~
23
</xsl:text>
24
      <xsl:apply-templates select="po:body"/>
15
      <xsl:apply-templates select="po:body"/>
25
      <xsl:apply-templates select="po:addData/po:data/po:Method"/>
16
      <xsl:apply-templates select="po:addData/po:data/po:Method"/>
26
</xsl:template>
17
</xsl:template>
27
<xsl:template match="po:pou[@pouType='program']">
18
<xsl:template match="po:pou[@pouType='program']">
28
      <xsl:text>---
29
~~~ST
30
</xsl:text>
31
      <xsl:text>PROGRAM </xsl:text><xsl:value-of select="@name" />
19
      <xsl:text>PROGRAM </xsl:text><xsl:value-of select="@name" />
32
      <xsl:apply-templates select="po:interface"/>
20
      <xsl:apply-templates select="po:interface"/>
33
      <xsl:text>
34
~~~
35
</xsl:text>
36
      <xsl:apply-templates select="po:body"/>
21
      <xsl:apply-templates select="po:body"/>
37
</xsl:template>
22
</xsl:template>
38
<xsl:template match="po:Method">
23
<xsl:template match="po:Method">
39
      <xsl:text>---
40
~~~ST
41
</xsl:text>
42
      <xsl:text>METHOD </xsl:text><xsl:value-of select="@name" />
24
      <xsl:text>METHOD </xsl:text><xsl:value-of select="@name" />
43
      <xsl:text>: </xsl:text>
25
      <xsl:text>: </xsl:text>
44
      <xsl:apply-templates select="*/po:returnType"/>
26
      <xsl:apply-templates select="*/po:returnType"/>
45
      <xsl:apply-templates select="po:interface"/>
27
      <xsl:apply-templates select="po:interface"/>
46
      <xsl:text>
47
~~~
48
</xsl:text>
49
      <xsl:apply-templates select="po:body"/>
28
      <xsl:apply-templates select="po:body"/>
50
</xsl:template>
29
</xsl:template>
51
30
52
<!--
31
<!--
53
 | Parse POU body
32
 | Parse POU body
...
...
154
133
155
<!--
134
<!--
156
 | Implement the presentation of the different languages
135
 | Implement the presentation of the different languages
157
-->
136
-->
158
<xsl:template match="po:ST">
137
<xsl:template match="po:ST">
159
      <xsl:text>~~~ST
138
      <xsl:value-of select="*[1]"/>
160
</xsl:text>
161
      <xsl:value-of select="*[1]"/>
162
      <xsl:text>
163
~~~
164
</xsl:text>
165
</xsl:template>
139
</xsl:template>
166
140
167
<xsl:template name="trim">
141
<xsl:template name="trim">
168
        <xsl:param name="input"/>
142
        <xsl:param name="input"/>
169
        <xsl:choose>
143
        <xsl:choose>