plcopen/instances_path.xslt
author Edouard Tisserant
Fri, 16 Feb 2018 01:38:34 +0100
changeset 1935 f2b0d849ea77
parent 1352 9ec4ac8e2955
child 1936 b85b13b1c2ec
permissions -rw-r--r--
Prevent compiling XSLT on each call of GetInstanceList. To be continued. More optimization needed here. 100x would be fine...
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
     1
<?xml version="1.0"?>
7280349a3375 Fixed pou instance path list computing 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="instances_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">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
     3
  <xsl:output method="xml"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
     4
  <xsl:variable name="space" select="'                                                                                                                                                                                                        '"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
     5
  <xsl:param name="autoindent" select="4"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
     6
  <xsl:param name="instance_type"/>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
     7
  <xsl:template match="text()">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
     8
    <xsl:param name="_indent" select="0"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
     9
  </xsl:template>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    10
  <xsl:variable name="project">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    11
    <xsl:copy-of select="document('project')/project/*"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    12
  </xsl:variable>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    13
  <xsl:variable name="stdlib">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    14
    <xsl:copy-of select="document('stdlib')/stdlib/*"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    15
  </xsl:variable>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    16
  <xsl:variable name="extensions">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    17
    <xsl:copy-of select="document('extensions')/extensions/*"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    18
  </xsl:variable>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    19
  <xsl:template match="ppx:project">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    20
    <xsl:param name="_indent" select="0"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    21
    <instances>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    22
      <xsl:apply-templates select="ppx:instances/ppx:configurations/ppx:configuration">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    23
        <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    24
      </xsl:apply-templates>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    25
    </instances>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    26
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    27
  <xsl:template match="ppx:configuration">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    28
    <xsl:param name="_indent" select="0"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    29
    <xsl:apply-templates select="ppx:globalVars/ppx:variable[ppx:type/ppx:derived] | ppx:resource">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    30
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    31
      <xsl:with-param name="parent_path">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    32
        <xsl:value-of select="@name"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    33
      </xsl:with-param>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    34
    </xsl:apply-templates>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    35
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    36
  <xsl:template match="ppx:resource">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    37
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    38
    <xsl:param name="parent_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    39
    <xsl:variable name="resource_path">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    40
      <xsl:value-of select="$parent_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    41
      <xsl:text>.</xsl:text>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    42
      <xsl:value-of select="@name"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    43
    </xsl:variable>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    44
    <xsl:apply-templates select="ppx:globalVars/ppx:variable[ppx:type/ppx:derived] | ppx:pouInstance | ppx:task/ppx:pouInstance">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    45
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    46
      <xsl:with-param name="parent_path">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    47
        <xsl:value-of select="$resource_path"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    48
      </xsl:with-param>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    49
    </xsl:apply-templates>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    50
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    51
  <xsl:template match="ppx:pouInstance">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    52
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    53
    <xsl:param name="parent_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    54
    <xsl:variable name="pou_instance_path">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    55
      <xsl:value-of select="$parent_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    56
      <xsl:text>.</xsl:text>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    57
      <xsl:value-of select="@name"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    58
    </xsl:variable>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    59
    <xsl:choose>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    60
      <xsl:when test="@typeName=$instance_type">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    61
        <xsl:value-of select="ns:AddInstance($pou_instance_path)"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    62
      </xsl:when>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    63
      <xsl:otherwise>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    64
        <xsl:variable name="type_name">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    65
          <xsl:value-of select="@typeName"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    66
        </xsl:variable>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    67
        <xsl:apply-templates 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:pous/ppx:pou[@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:pous/ppx:pou[@name=$type_name] |&#10;                         exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    68
          <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    69
          <xsl:with-param name="instance_path">
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    70
            <xsl:value-of select="$pou_instance_path"/>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    71
          </xsl:with-param>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    72
        </xsl:apply-templates>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    73
      </xsl:otherwise>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    74
    </xsl:choose>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    75
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    76
  <xsl:template match="ppx:pou">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    77
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    78
    <xsl:param name="instance_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    79
    <xsl:apply-templates select="ppx:interface/*/ppx:variable[ppx:type/ppx:derived]">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    80
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    81
      <xsl:with-param name="parent_path">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    82
        <xsl:value-of select="$instance_path"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    83
      </xsl:with-param>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    84
    </xsl:apply-templates>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    85
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    86
  <xsl:template match="ppx:dataType">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    87
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    88
    <xsl:param name="instance_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    89
    <xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    90
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    91
      <xsl:with-param name="parent_path">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    92
        <xsl:value-of select="$instance_path"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    93
      </xsl:with-param>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    94
    </xsl:apply-templates>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    95
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    96
  <xsl:template match="ppx:variable">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
    97
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    98
    <xsl:param name="parent_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
    99
    <xsl:variable name="variable_path">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   100
      <xsl:value-of select="$parent_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   101
      <xsl:text>.</xsl:text>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   102
      <xsl:value-of select="@name"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   103
    </xsl:variable>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   104
    <xsl:apply-templates select="ppx:type/ppx:derived">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   105
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   106
      <xsl:with-param name="variable_path">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   107
        <xsl:value-of select="$variable_path"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   108
      </xsl:with-param>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   109
    </xsl:apply-templates>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   110
  </xsl:template>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   111
  <xsl:template match="ppx:derived">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   112
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   113
    <xsl:param name="variable_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   114
    <xsl:choose>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   115
      <xsl:when test="@name=$instance_type">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   116
        <xsl:value-of select="ns:AddInstance($variable_path)"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   117
      </xsl:when>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   118
      <xsl:otherwise>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   119
        <xsl:variable name="type_name">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   120
          <xsl:value-of select="@name"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   121
        </xsl:variable>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   122
        <xsl:apply-templates 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:pous/ppx:pou[@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:pous/ppx:pou[@name=$type_name] |&#10;                         exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   123
          <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   124
          <xsl:with-param name="instance_path">
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   125
            <xsl:value-of select="$variable_path"/>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   126
          </xsl:with-param>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   127
        </xsl:apply-templates>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   128
      </xsl:otherwise>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   129
    </xsl:choose>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   130
  </xsl:template>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   131
  <xsl:template match="ppx:struct">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   132
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   133
    <xsl:param name="variable_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   134
    <xsl:for-each select="ppx:variable[ppx:type/ppx:derived or ppx:type/ppx:struct or ppx:type/ppx:array]">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   135
      <xsl:variable name="element_path">
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   136
        <xsl:value-of select="$variable_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   137
        <xsl:text>.</xsl:text>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   138
        <xsl:value-of select="@name"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   139
      </xsl:variable>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   140
    </xsl:for-each>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   141
    <xsl:apply-templates select="ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   142
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   143
      <xsl:with-param name="variable_path">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   144
        <xsl:value-of select="$element_path"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   145
      </xsl:with-param>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   146
    </xsl:apply-templates>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   147
  </xsl:template>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   148
  <xsl:template match="ppx:array">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   149
    <xsl:param name="_indent" select="0"/>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   150
    <xsl:param name="variable_path"/>
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   151
    <xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   152
      <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   153
      <xsl:with-param name="variable_path">
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   154
        <xsl:value-of select="$variable_path"/>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   155
      </xsl:with-param>
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   156
    </xsl:apply-templates>
1319
748347102c97 Replaced old list of pou instance in project generating process by xslt stylesheet
Laurent Bessard
parents:
diff changeset
   157
  </xsl:template>
1350
7280349a3375 Fixed pou instance path list computing stylesheet
Laurent Bessard
parents: 1319
diff changeset
   158
</xsl:stylesheet>