plcopen/variables_infos.xslt
author Edouard Tisserant
Mon, 19 Feb 2018 15:15:36 +0100
changeset 1949 c266fbaae0f6
parent 1936 b85b13b1c2ec
child 1951 bbd1e1744c91
permissions -rw-r--r--
Better writing of some xpath added in previous commits about XSLT optimization.
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
     1
<?xml version="1.0"?>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
     2
<xsl:stylesheet xmlns:exsl="http://exslt.org/common" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" xmlns:ns="var_infos_ns" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="ns" version="1.0" exclude-result-prefixes="ns">
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
     3
  <xsl:output method="xml"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
     4
  <xsl:param name="tree"/>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
     5
  <xsl:template match="text()"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
     6
  <xsl:variable name="project">
1368
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
     7
    <xsl:copy-of select="document('project')/project/*"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
     8
  </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
     9
  <xsl:variable name="stdlib">
1368
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
    10
    <xsl:copy-of select="document('stdlib')/stdlib/*"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    11
  </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    12
  <xsl:variable name="extensions">
1368
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
    13
    <xsl:copy-of select="document('extensions')/extensions/*"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    14
  </xsl:variable>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
    15
  <xsl:template match="ppx:configuration">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
    16
    <xsl:apply-templates select="ppx:globalVars"/>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
    17
  </xsl:template>
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
    18
  <xsl:template match="ppx:resource">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
    19
    <xsl:apply-templates select="ppx:globalVars"/>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
    20
  </xsl:template>
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
    21
  <xsl:template match="ppx:pou">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
    22
    <xsl:apply-templates select="ppx:interface/*"/>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
    23
  </xsl:template>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    24
  <xsl:template match="ppx:returnType">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    25
    <xsl:value-of select="ns:AddTree()"/>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
    26
    <xsl:apply-templates mode="var_type" select="."/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    27
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    28
  <xsl:template name="variables_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    29
    <xsl:param name="var_class"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    30
    <xsl:variable name="var_option">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    31
      <xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    32
        <xsl:when test="@constant='true' or @constant='1'">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    33
          <xsl:text>Constant</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    34
        </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    35
        <xsl:when test="@retain='true' or @retain='1'">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    36
          <xsl:text>Retain</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    37
        </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    38
        <xsl:when test="@nonretain='true' or @nonretain='1'">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    39
          <xsl:text>Non-Retain</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    40
        </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    41
      </xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    42
    </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    43
    <xsl:for-each select="ppx:variable">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    44
      <xsl:variable name="initial_value">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
    45
        <xsl:apply-templates select="ppx:initialValue"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    46
      </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    47
      <xsl:variable name="edit">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    48
        <xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    49
          <xsl:when test="$var_class='Global' or $var_class='External'">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    50
            <xsl:text>true</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    51
          </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    52
          <xsl:otherwise>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
    53
            <xsl:apply-templates mode="var_edit" select="ppx:type"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    54
          </xsl:otherwise>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    55
        </xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    56
      </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    57
      <xsl:value-of select="ns:AddTree()"/>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
    58
      <xsl:apply-templates mode="var_type" select="ppx:type"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    59
      <xsl:value-of select="ns:AddVariable(@name, $var_class, $var_option, @address, $initial_value, $edit, ppx:documentation/xhtml:p/text())"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    60
    </xsl:for-each>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    61
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    62
  <xsl:template match="ppx:localVars">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    63
    <xsl:call-template name="variables_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    64
      <xsl:with-param name="var_class">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    65
        <xsl:text>Local</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    66
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    67
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    68
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    69
  <xsl:template match="ppx:globalVars">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    70
    <xsl:call-template name="variables_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    71
      <xsl:with-param name="var_class">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    72
        <xsl:text>Global</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    73
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    74
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    75
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    76
  <xsl:template match="ppx:externalVars">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    77
    <xsl:call-template name="variables_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    78
      <xsl:with-param name="var_class">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    79
        <xsl:text>External</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    80
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    81
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    82
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    83
  <xsl:template match="ppx:tempVars">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    84
    <xsl:call-template name="variables_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    85
      <xsl:with-param name="var_class">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    86
        <xsl:text>Temp</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    87
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    88
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    89
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    90
  <xsl:template match="ppx:inputVars">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    91
    <xsl:call-template name="variables_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    92
      <xsl:with-param name="var_class">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    93
        <xsl:text>Input</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    94
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    95
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    96
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    97
  <xsl:template match="ppx:outputVars">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    98
    <xsl:call-template name="variables_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
    99
      <xsl:with-param name="var_class">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   100
        <xsl:text>Output</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   101
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   102
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   103
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   104
  <xsl:template match="ppx:inOutVars">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   105
    <xsl:call-template name="variables_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   106
      <xsl:with-param name="var_class">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   107
        <xsl:text>InOut</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   108
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   109
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   110
  </xsl:template>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   111
  <xsl:template mode="var_type" match="ppx:pou">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   112
    <xsl:apply-templates mode="var_type" select="ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable"/>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   113
  </xsl:template>
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   114
  <xsl:template mode="var_type" match="ppx:variable">
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   115
    <xsl:variable name="name">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   116
      <xsl:value-of select="@name"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   117
    </xsl:variable>
1368
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   118
    <xsl:value-of select="ns:AddTree()"/>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   119
    <xsl:apply-templates mode="var_type" select="ppx:type"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   120
    <xsl:value-of select="ns:AddVarToTree($name)"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   121
  </xsl:template>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   122
  <xsl:template mode="var_type" match="ppx:dataType">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   123
    <xsl:apply-templates mode="var_type" select="ppx:baseType"/>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   124
  </xsl:template>
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   125
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   126
    <xsl:apply-templates mode="var_type" select="ppx:variable"/>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   127
  </xsl:template>
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   128
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   129
    <xsl:variable name="type_name">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   130
      <xsl:value-of select="@name"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   131
    </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   132
    <xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   133
      <xsl:when test="$tree='True'">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   134
        <xsl:apply-templates mode="var_type" 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]"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   135
      </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   136
    </xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   137
    <xsl:value-of select="ns:SetType($type_name)"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   138
  </xsl:template>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   139
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   140
    <xsl:apply-templates mode="var_type" select="ppx:baseType"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   141
    <xsl:for-each select="ppx:dimension">
1368
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   142
      <xsl:variable name="lower">
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   143
        <xsl:value-of select="@lower"/>
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   144
      </xsl:variable>
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   145
      <xsl:variable name="upper">
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   146
        <xsl:value-of select="@upper"/>
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   147
      </xsl:variable>
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   148
      <xsl:value-of select="ns:AddDimension($lower, $upper)"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   149
    </xsl:for-each>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   150
  </xsl:template>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   151
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string">
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   152
    <xsl:variable name="name">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   153
      <xsl:text>STRING</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   154
    </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   155
    <xsl:value-of select="ns:SetType($name)"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   156
  </xsl:template>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   157
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring">
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   158
    <xsl:variable name="name">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   159
      <xsl:text>WSTRING</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   160
    </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   161
    <xsl:value-of select="ns:SetType($name)"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   162
  </xsl:template>
1361
7158aa054226 Fixed bugs when editing resource variables and tasks
Laurent Bessard
parents: 1359
diff changeset
   163
  <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   164
    <xsl:variable name="name">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   165
      <xsl:value-of select="local-name()"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   166
    </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   167
    <xsl:value-of select="ns:SetType($name)"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   168
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   169
  <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
1368
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   170
    <xsl:variable name="type_name">
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   171
      <xsl:value-of select="@name"/>
e567e4bee11f Fixed bugs with pou variable infos computation stylesheet
Laurent Bessard
parents: 1361
diff changeset
   172
    </xsl:variable>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   173
    <xsl:variable name="pou_infos">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   174
      <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]"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   175
    </xsl:variable>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   176
    <xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   177
      <xsl:when test="$pou_infos != ''">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   178
        <xsl:text>false</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   179
      </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   180
      <xsl:otherwise>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   181
        <xsl:text>true</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   182
      </xsl:otherwise>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   183
    </xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   184
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   185
  <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   186
    <xsl:text>true</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   187
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   188
  <xsl:template match="ppx:value">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   189
    <xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   190
      <xsl:when test="@repetitionValue">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   191
        <xsl:value-of select="@repetitionValue"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   192
        <xsl:text>(</xsl:text>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   193
        <xsl:apply-templates/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   194
        <xsl:text>)</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   195
      </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   196
      <xsl:when test="@member">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   197
        <xsl:value-of select="@member"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   198
        <xsl:text> := </xsl:text>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   199
        <xsl:apply-templates/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   200
      </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   201
      <xsl:otherwise>
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   202
        <xsl:apply-templates/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   203
      </xsl:otherwise>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   204
    </xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   205
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   206
  <xsl:template match="ppx:simpleValue">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   207
    <xsl:value-of select="@value"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   208
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   209
  <xsl:template name="complex_type_value">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   210
    <xsl:param name="start_bracket"/>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   211
    <xsl:param name="end_bracket"/>
1359
cce13b237b07 Fixed bug when loading complex type variable initial value
Laurent Bessard
parents: 1349
diff changeset
   212
    <xsl:value-of select="$start_bracket"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   213
    <xsl:for-each select="ppx:value">
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1368
diff changeset
   214
      <xsl:apply-templates select="."/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   215
      <xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   216
        <xsl:when test="position()!=last()">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   217
          <xsl:text>, </xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   218
        </xsl:when>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   219
      </xsl:choose>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   220
    </xsl:for-each>
1359
cce13b237b07 Fixed bug when loading complex type variable initial value
Laurent Bessard
parents: 1349
diff changeset
   221
    <xsl:value-of select="$end_bracket"/>
1349
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   222
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   223
  <xsl:template match="ppx:arrayValue">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   224
    <xsl:call-template name="complex_type_value">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   225
      <xsl:with-param name="start_bracket">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   226
        <xsl:text>[</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   227
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   228
      <xsl:with-param name="end_bracket">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   229
        <xsl:text>]</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   230
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   231
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   232
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   233
  <xsl:template match="ppx:structValue">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   234
    <xsl:call-template name="complex_type_value">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   235
      <xsl:with-param name="start_bracket">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   236
        <xsl:text>(</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   237
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   238
      <xsl:with-param name="end_bracket">
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   239
        <xsl:text>)</xsl:text>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   240
      </xsl:with-param>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   241
    </xsl:call-template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   242
  </xsl:template>
be6c3a036844 Fixed xslt stylesheets with pretty print versions
Laurent Bessard
parents: 1347
diff changeset
   243
</xsl:stylesheet>