plcopen/pou_variables.xslt
author Laurent Bessard
Sun, 29 Sep 2013 20:17:05 +0200
changeset 1334 b0c2c4e1c1f1
parent 1319 748347102c97
child 1348 aee0a7eb833a
permissions -rw-r--r--
Added support for loading PLCOpen v1 files and modify their content to be compatible with PLCOpen v2
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     1
<xsl:stylesheet version="1.0"
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     2
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     3
    xmlns:ppx="http://www.plcopen.org/xml/tc6_0201"
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     4
    xmlns:ns="pou_vars_ns"
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     5
    extension-element-prefixes="ns"
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     6
    exclude-result-prefixes="ns">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     7
  <xsl:template match="ppx:pou">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     8
    <pou>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     9
      <class><xsl:value-of select="@pouType"/></class>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    10
      <type><xsl:value-of select="@name"/></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    11
      <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    12
      <debug><xsl:text>True</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    13
      <variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    14
        <xsl:apply-templates select="ppx:interface"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    15
        <xsl:apply-templates select="ppx:actions/ppx:action | ppx:transitions/ppx:transition" mode="variable_list"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    16
      </variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    17
    </pou>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    18
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    19
  <xsl:template match="ppx:action">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    20
    <action>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    21
      <class/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    22
      <type><xsl:text>None</xsl:text></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    23
      <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    24
      <debug><xsl:text>True</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    25
      <variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    26
        <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    27
      </variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    28
    </action>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    29
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    30
  <xsl:template match="ppx:transition">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    31
    <transition>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    32
      <class/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    33
      <type><xsl:text>None</xsl:text></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    34
      <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    35
      <debug><xsl:text>True</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    36
      <variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    37
        <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    38
      </variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    39
    </transition>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    40
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    41
  <xsl:template match="ppx:configuration">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    42
    <configuration>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    43
      <class/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    44
      <type><xsl:text>None</xsl:text></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    45
      <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    46
      <debug><xsl:text>False</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    47
      <variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    48
        <xsl:apply-templates select="ppx:resource" mode="variable_list"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    49
        <xsl:apply-templates select="ppx:globalVars"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    50
      </variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    51
    </configuration>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    52
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    53
  <xsl:template match="ppx:resource">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    54
    <resource>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    55
      <class/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    56
      <type><xsl:text>None</xsl:text></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    57
      <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    58
      <debug><xsl:text>False</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    59
      <variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    60
        <xsl:apply-templates select="ppx:pouInstance | ppx:task/ppx:pouInstance" mode="variable_list"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    61
        <xsl:apply-templates select="ppx:globalVars"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    62
      </variables>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    63
    </resource>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    64
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    65
  <xsl:template match="ppx:localVars">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    66
    <xsl:call-template name="variables_infos">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    67
      <xsl:with-param name="var_class" select="'Local'"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    68
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    69
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    70
  <xsl:template match="ppx:globalVars">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    71
    <xsl:call-template name="variables_infos">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    72
      <xsl:with-param name="var_class" select="'Global'"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    73
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    74
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    75
  <xsl:template match="ppx:externalVars">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    76
    <xsl:call-template name="variables_infos">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    77
      <xsl:with-param name="var_class" select="'External'"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    78
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    79
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    80
  <xsl:template match="ppx:tempVars">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    81
    <xsl:call-template name="variables_infos">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    82
      <xsl:with-param name="var_class" select="'Temp'"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    83
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    84
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    85
  <xsl:template match="ppx:inputVars">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    86
    <xsl:call-template name="variables_infos">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    87
      <xsl:with-param name="var_class" select="'Input'"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    88
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    89
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    90
  <xsl:template match="ppx:outputVars">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    91
    <xsl:call-template name="variables_infos">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    92
      <xsl:with-param name="var_class" select="'Output'"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    93
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    94
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    95
  <xsl:template match="ppx:inOutVars">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    96
    <xsl:call-template name="variables_infos">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    97
      <xsl:with-param name="var_class" select="'InOut'"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    98
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    99
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   100
  <xsl:template name="variables_infos">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   101
    <xsl:param name="var_class"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   102
	<xsl:for-each select="ppx:variable">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   103
      <variable>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   104
	    <name><xsl:value-of select="@name"/></name>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   105
	    <class>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   106
	      <xsl:apply-templates mode="var_class">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   107
	        <xsl:with-param name="default_class">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   108
	          <xsl:value-of select="$var_class"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   109
	        </xsl:with-param>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   110
	      </xsl:apply-templates>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   111
	    </class>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   112
	    <type><xsl:apply-templates mode="var_type"/></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   113
	    <edit><xsl:apply-templates mode="var_edit"/></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   114
	    <debug><xsl:apply-templates mode="var_debug"/></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   115
      </variable>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   116
    </xsl:for-each>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   117
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   118
  <xsl:template match="ppx:transition" mode="variable_list">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   119
    <transition>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   120
      <name><xsl:value-of select="@name"/></name>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   121
      <class/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   122
      <type><xsl:text>None</xsl:text></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   123
      <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   124
      <debug><xsl:text>True</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   125
    </transition>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   126
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   127
  <xsl:template match="ppx:action" mode="variable_list">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   128
    <action>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   129
	  <name><xsl:value-of select="@name"/></name>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   130
	  <class/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   131
      <type><xsl:text>None</xsl:text></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   132
	  <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   133
      <debug><xsl:text>True</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   134
    </action>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   135
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   136
  <xsl:template match="ppx:resource" mode="variable_list">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   137
    <resource>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   138
      <name><xsl:value-of select="@name"/></name>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   139
      <class/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   140
      <type><xsl:text>None</xsl:text></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   141
      <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   142
      <debug><xsl:text>False</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   143
    </resource>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   144
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   145
  <xsl:template match="ppx:pouInstance" mode="variable_list">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   146
    <program>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   147
      <name><xsl:value-of select="@name"/></name>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   148
      <class/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   149
      <type><xsl:value-of select="@typeName"/></type>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   150
      <edit><xsl:text>True</xsl:text></edit>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   151
      <debug><xsl:text>True</xsl:text></debug>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   152
    </program>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   153
  </xsl:template>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   154
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:derived" mode="var_class">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   155
    <xsl:param name="default_class"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   156
    <ns:pou_class>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   157
      <xsl:value-of select="$default_class"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   158
    </ns:pou_class>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   159
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   160
  <xsl:template match="ppx:pou" mode="var_class">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   161
    <xsl:param name="default_class"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   162
    <xsl:value-of select="@pouType"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   163
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   164
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/*" mode="var_class">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   165
    <xsl:param name="default_class"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   166
    <xsl:value-of select="$default_class"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   167
  </xsl:template>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   168
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:derived" mode="var_type">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   169
    <xsl:value-of select="@name"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   170
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   171
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:array" mode="var_type">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   172
    <xsl:text>ARRAY [</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   173
    <xsl:for-each select="ppx:dimension">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   174
      <xsl:value-of select="@lower"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   175
      <xsl:text>..</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   176
      <xsl:value-of select="@upper"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   177
    </xsl:for-each>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   178
    <xsl:text>] OF </xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   179
    <xsl:apply-templates select="ppx:baseType" mode="var_type"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   180
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   181
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:string" mode="var_type">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   182
    <xsl:text>STRING</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   183
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   184
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:wstring" mode="var_type">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   185
    <xsl:text>WSTRING</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   186
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   187
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/*" mode="var_type">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   188
    <xsl:value-of select="local-name()"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   189
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   190
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:derived" mode="var_edit">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   191
    <ns:is_edited/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   192
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   193
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:array" mode="var_edit">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   194
    <xsl:apply-templates select="ppx:baseType" mode="var_edit"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   195
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   196
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/*" mode="var_edit">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   197
    <xsl:text>False</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   198
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   199
    <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:derived" mode="var_debug">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   200
    <ns:is_debugged/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   201
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   202
  <xsl:template match="ppx:pou" mode="var_debug">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   203
    <xsl:text>True</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   204
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   205
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:array" mode="var_debug">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   206
    <xsl:text>False</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   207
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   208
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/ppx:struct" mode="var_debug">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   209
    <xsl:text>False</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   210
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   211
  <xsl:template match="*[self::ppx:type or self::ppx:baseType]/*" mode="var_debug">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   212
    <xsl:text>True</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   213
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   214
  <xsl:template match="text()"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   215
  <xsl:template match="text()" mode="var_class"/>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   216
  <xsl:template match="text()" mode="var_type"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   217
  <xsl:template match="text()" mode="var_edit"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   218
  <xsl:template match="text()" mode="var_debug"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   219
</xsl:stylesheet>