plcopen/pou_variables.xslt
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 17 Aug 2017 10:12:04 +0300
changeset 1761 8c98bad90b8d
parent 1348 aee0a7eb833a
child 1936 b85b13b1c2ec
permissions -rw-r--r--
clean-up: fix PEP8 E203 whitespace before ','
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     1
<?xml version="1.0"?>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     2
<xsl:stylesheet xmlns:func="http://exslt.org/functions" xmlns:dyn="http://exslt.org/dynamic" xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math" xmlns:exsl="http://exslt.org/common" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:yml="http://fdik.org/yml" xmlns:set="http://exslt.org/sets" xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" xmlns:ns="pou_vars_ns" xmlns:regexp="http://exslt.org/regular-expressions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="ns" version="1.0" exclude-result-prefixes="ns">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     3
  <xsl:output method="xml"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     4
  <xsl:variable name="space" select="'                                                                                                                                                                                                        '"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     5
  <xsl:param name="autoindent" select="4"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     6
  <xsl:template match="text()">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     7
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     8
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
     9
  <xsl:template mode="var_class" match="text()">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    10
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    11
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    12
  <xsl:template mode="var_type" match="text()">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    13
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    14
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    15
  <xsl:template mode="var_edit" match="text()">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    16
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    17
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    18
  <xsl:template mode="var_debug" match="text()">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    19
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    20
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    21
  <xsl:variable name="project">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    22
    <xsl:copy-of select="document('project')/project/*"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    23
  </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    24
  <xsl:variable name="stdlib">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    25
    <xsl:copy-of select="document('stdlib')/stdlib/*"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    26
  </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    27
  <xsl:variable name="extensions">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    28
    <xsl:copy-of select="document('extensions')/extensions/*"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    29
  </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    30
  <xsl:template name="add_root">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    31
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    32
    <xsl:param name="class"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    33
    <xsl:param name="type"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    34
    <xsl:param name="edit">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    35
      <xsl:text>true</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    36
    </xsl:param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    37
    <xsl:param name="debug">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    38
      <xsl:text>true</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    39
    </xsl:param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    40
    <xsl:value-of select="ns:SetRoot($class, $type, $edit, $debug)"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    41
  </xsl:template>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    42
  <xsl:template match="ppx:pou">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    43
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    44
    <xsl:call-template name="add_root">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    45
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    46
        <xsl:value-of select="@pouType"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    47
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    48
      <xsl:with-param name="type">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    49
        <xsl:value-of select="@name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    50
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    51
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    52
    <xsl:apply-templates select="ppx:interface">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    53
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    54
    </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    55
    <xsl:apply-templates mode="variable_list" select="ppx:actions/ppx:action | ppx:transitions/ppx:transition">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    56
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    57
    </xsl:apply-templates>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    58
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    59
  <xsl:template match="ppx:action">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    60
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    61
    <xsl:call-template name="add_root">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    62
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    63
        <xsl:text>action</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    64
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    65
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    66
    <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    67
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    68
    </xsl:apply-templates>
1316
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:transition">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    71
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    72
    <xsl:call-template name="add_root">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    73
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    74
        <xsl:text>transition</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    75
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    76
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    77
    <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    78
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    79
    </xsl:apply-templates>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    80
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    81
  <xsl:template match="ppx:configuration">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    82
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    83
    <xsl:call-template name="add_root">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    84
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    85
        <xsl:text>configuration</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    86
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    87
      <xsl:with-param name="debug">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    88
        <xsl:text>false</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    89
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    90
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    91
    <xsl:apply-templates mode="variable_list" select="ppx:resource">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    92
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    93
    </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    94
    <xsl:apply-templates select="ppx:globalVars">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    95
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    96
    </xsl:apply-templates>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    97
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    98
  <xsl:template match="ppx:resource">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
    99
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   100
    <xsl:call-template name="add_root">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   101
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   102
        <xsl:text>resource</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   103
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   104
      <xsl:with-param name="debug">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   105
        <xsl:text>false</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   106
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   107
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   108
    <xsl:apply-templates mode="variable_list" select="ppx:pouInstance | ppx:task/ppx:pouInstance">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   109
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   110
    </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   111
    <xsl:apply-templates select="ppx:globalVars">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   112
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   113
    </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   114
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   115
  <xsl:template name="variables_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   116
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   117
    <xsl:param name="var_class"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   118
    <xsl:for-each select="ppx:variable">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   119
      <xsl:variable name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   120
        <xsl:apply-templates mode="var_class" select="ppx:type">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   121
          <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   122
          <xsl:with-param name="default_class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   123
            <xsl:value-of select="$var_class"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   124
          </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   125
        </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   126
      </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   127
      <xsl:variable name="type">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   128
        <xsl:apply-templates mode="var_type" select="ppx:type">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   129
          <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   130
        </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   131
      </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   132
      <xsl:variable name="edit">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   133
        <xsl:apply-templates mode="var_edit" select="ppx:type">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   134
          <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   135
        </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   136
      </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   137
      <xsl:variable name="debug">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   138
        <xsl:apply-templates mode="var_debug" select="ppx:type">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   139
          <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   140
        </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   141
      </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   142
      <xsl:value-of select="ns:AddVariable(@name, $class, $type, $edit, $debug)"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   143
    </xsl:for-each>
1316
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:localVars">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   146
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   147
    <xsl:call-template name="variables_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   148
      <xsl:with-param name="var_class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   149
        <xsl:text>Local</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   150
      </xsl:with-param>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   151
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   152
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   153
  <xsl:template match="ppx:globalVars">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   154
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   155
    <xsl:call-template name="variables_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   156
      <xsl:with-param name="var_class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   157
        <xsl:text>Global</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   158
      </xsl:with-param>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   159
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   160
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   161
  <xsl:template match="ppx:externalVars">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   162
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   163
    <xsl:call-template name="variables_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   164
      <xsl:with-param name="var_class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   165
        <xsl:text>External</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   166
      </xsl:with-param>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   167
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   168
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   169
  <xsl:template match="ppx:tempVars">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   170
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   171
    <xsl:call-template name="variables_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   172
      <xsl:with-param name="var_class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   173
        <xsl:text>Temp</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   174
      </xsl:with-param>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   175
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   176
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   177
  <xsl:template match="ppx:inputVars">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   178
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   179
    <xsl:call-template name="variables_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   180
      <xsl:with-param name="var_class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   181
        <xsl:text>Input</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   182
      </xsl:with-param>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   183
    </xsl:call-template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   184
  </xsl:template>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   185
  <xsl:template match="ppx:outputVars">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   186
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   187
    <xsl:call-template name="variables_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   188
      <xsl:with-param name="var_class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   189
        <xsl:text>Output</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   190
      </xsl:with-param>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   191
    </xsl:call-template>
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="ppx:inOutVars">
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   194
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   195
    <xsl:call-template name="variables_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   196
      <xsl:with-param name="var_class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   197
        <xsl:text>InOut</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   198
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   199
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   200
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   201
  <xsl:template name="add_variable">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   202
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   203
    <xsl:param name="name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   204
    <xsl:param name="class"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   205
    <xsl:param name="type"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   206
    <xsl:param name="edit">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   207
      <xsl:text>true</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   208
    </xsl:param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   209
    <xsl:param name="debug">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   210
      <xsl:text>true</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   211
    </xsl:param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   212
    <xsl:value-of select="ns:AddVariable($name, $class, $type, $edit, $debug)"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   213
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   214
  <xsl:template mode="variable_list" match="ppx:action">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   215
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   216
    <xsl:call-template name="add_variable">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   217
      <xsl:with-param name="name">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   218
        <xsl:value-of select="@name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   219
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   220
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   221
        <xsl:text>action</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   222
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   223
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   224
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   225
  <xsl:template mode="variable_list" match="ppx:transition">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   226
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   227
    <xsl:call-template name="add_variable">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   228
      <xsl:with-param name="name">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   229
        <xsl:value-of select="@name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   230
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   231
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   232
        <xsl:text>transition</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   233
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   234
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   235
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   236
  <xsl:template mode="variable_list" match="ppx:resource">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   237
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   238
    <xsl:call-template name="add_variable">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   239
      <xsl:with-param name="name">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   240
        <xsl:value-of select="@name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   241
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   242
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   243
        <xsl:text>resource</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   244
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   245
      <xsl:with-param name="debug">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   246
        <xsl:text>false</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   247
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   248
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   249
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   250
  <xsl:template mode="variable_list" match="ppx:pouInstance">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   251
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   252
    <xsl:call-template name="add_variable">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   253
      <xsl:with-param name="name">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   254
        <xsl:value-of select="@name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   255
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   256
      <xsl:with-param name="class">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   257
        <xsl:text>program</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   258
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   259
      <xsl:with-param name="type">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   260
        <xsl:value-of select="@typeName"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   261
      </xsl:with-param>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   262
    </xsl:call-template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   263
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   264
  <xsl:template mode="var_class" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   265
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   266
    <xsl:param name="default_class"/>
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   267
    <xsl:variable name="type_name" select="@name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   268
    <xsl:variable name="pou_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   269
      <xsl:copy-of select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                    exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                    exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   270
    </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   271
    <xsl:choose>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   272
      <xsl:when test="$pou_infos != ''">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   273
        <xsl:apply-templates mode="var_class" select="exsl:node-set($pou_infos)">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   274
          <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   275
        </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   276
      </xsl:when>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   277
      <xsl:otherwise>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   278
        <xsl:value-of select="$default_class"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   279
      </xsl:otherwise>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   280
    </xsl:choose>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   281
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   282
  <xsl:template mode="var_class" match="ppx:pou">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   283
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   284
    <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
   285
  </xsl:template>
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   286
  <xsl:template mode="var_class" match="*[self::ppx:type or self::ppx:baseType]/*">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   287
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents: 1316
diff changeset
   288
    <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
   289
    <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
   290
  </xsl:template>
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   291
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   292
    <xsl:param name="_indent" select="0"/>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   293
    <xsl:value-of select="@name"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   294
  </xsl:template>
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   295
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:array">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   296
    <xsl:param name="_indent" select="0"/>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   297
    <xsl:text>ARRAY [</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   298
    <xsl:for-each select="ppx:dimension">
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   299
      <xsl:value-of select="@lower"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   300
      <xsl:text>..</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   301
      <xsl:value-of select="@upper"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   302
    </xsl:for-each>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   303
    <xsl:text>] OF </xsl:text>
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   304
    <xsl:apply-templates mode="var_type" select="ppx:baseType">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   305
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   306
    </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   307
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   308
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:string">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   309
    <xsl:param name="_indent" select="0"/>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   310
    <xsl:text>STRING</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   311
  </xsl:template>
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   312
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:wstring">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   313
    <xsl:param name="_indent" select="0"/>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   314
    <xsl:text>WSTRING</xsl:text>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   315
  </xsl:template>
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   316
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/*">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   317
    <xsl:param name="_indent" select="0"/>
1316
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   318
    <xsl:value-of select="local-name()"/>
df9d02bd3eb7 Replaced old pou instance variable list generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   319
  </xsl:template>
1348
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   320
  <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   321
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   322
    <xsl:variable name="type_name" select="@name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   323
    <xsl:variable name="pou_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   324
      <xsl:copy-of select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   325
    </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   326
    <xsl:choose>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   327
      <xsl:when test="$pou_infos != ''">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   328
        <xsl:text>true</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   329
      </xsl:when>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   330
      <xsl:otherwise>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   331
        <xsl:text>false</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   332
      </xsl:otherwise>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   333
    </xsl:choose>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   334
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   335
  <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/ppx:array">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   336
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   337
    <xsl:apply-templates mode="var_edit" select="ppx:baseType">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   338
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   339
    </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   340
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   341
  <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/*">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   342
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   343
    <xsl:text>false</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   344
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   345
  <xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   346
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   347
    <xsl:variable name="type_name" select="@name"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   348
    <xsl:variable name="datatype_infos">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   349
      <xsl:copy-of select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                    exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |&#10;                    exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |&#10;                    exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   350
    </xsl:variable>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   351
    <xsl:choose>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   352
      <xsl:when test="$datatype_infos != ''">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   353
        <xsl:apply-templates mode="var_debug" select="exsl:node-set($datatype_infos)">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   354
          <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   355
        </xsl:apply-templates>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   356
      </xsl:when>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   357
      <xsl:otherwise>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   358
        <xsl:text>false</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   359
      </xsl:otherwise>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   360
    </xsl:choose>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   361
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   362
  <xsl:template mode="var_debug" match="ppx:pou">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   363
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   364
    <xsl:text>true</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   365
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   366
  <xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/ppx:array">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   367
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   368
    <xsl:text>false</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   369
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   370
  <xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/ppx:struct">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   371
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   372
    <xsl:text>false</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   373
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   374
  <xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/*">
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   375
    <xsl:param name="_indent" select="0"/>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   376
    <xsl:text>true</xsl:text>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   377
  </xsl:template>
aee0a7eb833a Fixed pou variables instance information loading stylesheet
Laurent Bessard
parents: 1319
diff changeset
   378
</xsl:stylesheet>