--- a/plcopen/instance_tagname.xslt Fri Feb 16 01:38:34 2018 +0100
+++ b/plcopen/instance_tagname.xslt Fri Feb 16 01:48:48 2018 +0100
@@ -1,8 +1,6 @@
-<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="instance_tagname_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">
+<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="instance_tagname_ns" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="ns" version="1.0" exclude-result-prefixes="ns"> <xsl:output method="xml"/>
- <xsl:variable name="space" select="' '"/>
- <xsl:param name="autoindent" select="4"/>
<xsl:param name="instance_path"/>
<xsl:variable name="project">
<xsl:copy-of select="document('project')/project/*"/>
@@ -14,7 +12,6 @@
<xsl:copy-of select="document('extensions')/extensions/*"/>
<xsl:template name="element_name">
- <xsl:param name="_indent" select="0"/>
<xsl:when test="contains($path,'.')">
@@ -26,7 +23,6 @@
<xsl:template name="next_path">
- <xsl:param name="_indent" select="0"/>
<xsl:when test="contains($path,'.')">
@@ -35,14 +31,12 @@
<xsl:template match="ppx:project">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="config_name">
<xsl:call-template name="element_name">
<xsl:with-param name="path" select="$instance_path"/>
<xsl:apply-templates select="ppx:instances/ppx:configurations/ppx:configuration[@name=$config_name]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path">
<xsl:call-template name="next_path">
<xsl:with-param name="path" select="$instance_path"/>
@@ -51,7 +45,6 @@
<xsl:template match="ppx:configuration">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="element_path"/>
<xsl:when test="$element_path!=''">
@@ -61,7 +54,6 @@
<xsl:apply-templates select="ppx:resource[@name=$child_name] | ppx:globalVars/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path">
<xsl:call-template name="next_path">
<xsl:with-param name="path" select="$element_path"/>
@@ -75,7 +67,6 @@
<xsl:template match="ppx:resource">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="element_path"/>
<xsl:when test="$element_path!=''">
@@ -87,7 +78,6 @@
<xsl:apply-templates select="ppx:pouInstance[@name=$child_name] | ppx:task/ppx:pouInstance[@name=$child_name] | ppx:globalVars/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path">
<xsl:call-template name="next_path">
<xsl:with-param name="path" select="$element_path"/>
@@ -101,18 +91,15 @@
<xsl:template match="ppx:pouInstance">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="element_path"/>
<xsl:variable name="type_name">
<xsl:value-of select="@typeName"/>
<xsl:apply-templates select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path" select="$element_path"/>
<xsl:template match="ppx:pou">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="element_path"/>
<xsl:when test="$element_path!=''">
@@ -122,16 +109,13 @@
<xsl:apply-templates select="ppx:interface/*/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path">
<xsl:call-template name="next_path">
<xsl:with-param name="path" select="$element_path"/>
- <xsl:apply-templates select="ppx:actions/ppx:action[@name=$child_name] | ppx:transitions/ppx:transition[@name=$child_name]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:actions/ppx:action[@name=$child_name] | ppx:transitions/ppx:transition[@name=$child_name]"/> <xsl:variable name="name">
@@ -142,42 +126,33 @@
<xsl:template match="ppx:action">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:ActionTagName(ancestor::ppx:pou/@name, @name)"/>
<xsl:template match="ppx:transition">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:TransitionTagName(ancestor::ppx:pou/@name, @name)"/>
<xsl:template match="ppx:dataType">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="element_path"/>
<xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path" select="$element_path"/>
<xsl:template match="ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="element_path"/>
<xsl:variable name="type_name">
<xsl:value-of select="@name"/>
<xsl:apply-templates select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path" select="$element_path"/>
<xsl:template match="ppx:array">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="element_path"/>
<xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path" select="$element_path"/>
<xsl:template match="ppx:struct">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="element_path"/>
<xsl:variable name="child_name">
<xsl:call-template name="element_name">
@@ -185,7 +160,6 @@
<xsl:apply-templates select="ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="element_path">
<xsl:call-template name="next_path">
<xsl:with-param name="path" select="$element_path"/>
--- a/plcopen/instances_path.xslt Fri Feb 16 01:38:34 2018 +0100
+++ b/plcopen/instances_path.xslt Fri Feb 16 01:48:48 2018 +0100
@@ -1,12 +1,8 @@
-<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">
+<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="instances_ns" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="ns" version="1.0" exclude-result-prefixes="ns"> <xsl:output method="xml"/>
- <xsl:variable name="space" select="' '"/>
- <xsl:param name="autoindent" select="4"/>
<xsl:param name="instance_type"/>
- <xsl:template match="text()">
- <xsl:param name="_indent" select="0"/>
+ <xsl:template match="text()"/> <xsl:variable name="project">
<xsl:copy-of select="document('project')/project/*"/>
@@ -17,24 +13,18 @@
<xsl:copy-of select="document('extensions')/extensions/*"/>
<xsl:template match="ppx:project">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates select="ppx:instances/ppx:configurations/ppx:configuration">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:instances/ppx:configurations/ppx:configuration"/> <xsl:template match="ppx:configuration">
- <xsl:param name="_indent" select="0"/>
<xsl:apply-templates select="ppx:globalVars/ppx:variable[ppx:type/ppx:derived] | ppx:resource">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="parent_path">
<xsl:value-of select="@name"/>
<xsl:template match="ppx:resource">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="parent_path"/>
<xsl:variable name="resource_path">
<xsl:value-of select="$parent_path"/>
@@ -42,14 +32,12 @@
<xsl:value-of select="@name"/>
<xsl:apply-templates select="ppx:globalVars/ppx:variable[ppx:type/ppx:derived] | ppx:pouInstance | ppx:task/ppx:pouInstance">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="parent_path">
<xsl:value-of select="$resource_path"/>
<xsl:template match="ppx:pouInstance">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="parent_path"/>
<xsl:variable name="pou_instance_path">
<xsl:value-of select="$parent_path"/>
@@ -65,7 +53,6 @@
<xsl:value-of select="@typeName"/>
<xsl:apply-templates select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="instance_path">
<xsl:value-of select="$pou_instance_path"/>
@@ -74,27 +61,22 @@
<xsl:template match="ppx:pou">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="instance_path"/>
<xsl:apply-templates select="ppx:interface/*/ppx:variable[ppx:type/ppx:derived]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="parent_path">
<xsl:value-of select="$instance_path"/>
<xsl:template match="ppx:dataType">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="instance_path"/>
<xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="parent_path">
<xsl:value-of select="$instance_path"/>
<xsl:template match="ppx:variable">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="parent_path"/>
<xsl:variable name="variable_path">
<xsl:value-of select="$parent_path"/>
@@ -102,14 +84,12 @@
<xsl:value-of select="@name"/>
<xsl:apply-templates select="ppx:type/ppx:derived">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="variable_path">
<xsl:value-of select="$variable_path"/>
<xsl:template match="ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="variable_path"/>
<xsl:when test="@name=$instance_type">
@@ -120,7 +100,6 @@
<xsl:value-of select="@name"/>
<xsl:apply-templates select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="instance_path">
<xsl:value-of select="$variable_path"/>
@@ -129,7 +108,6 @@
<xsl:template match="ppx:struct">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="variable_path"/>
<xsl:for-each select="ppx:variable[ppx:type/ppx:derived or ppx:type/ppx:struct or ppx:type/ppx:array]">
<xsl:variable name="element_path">
@@ -139,17 +117,14 @@
<xsl:apply-templates select="ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="variable_path">
<xsl:value-of select="$element_path"/>
<xsl:template match="ppx:array">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="variable_path"/>
<xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="variable_path">
<xsl:value-of select="$variable_path"/>
--- a/plcopen/pou_block_instances.xslt Fri Feb 16 01:38:34 2018 +0100
+++ b/plcopen/pou_block_instances.xslt Fri Feb 16 01:48:48 2018 +0100
@@ -1,24 +1,15 @@
-<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_block_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">
+<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="pou_block_instances_ns" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="ns" version="1.0" exclude-result-prefixes="ns"> <xsl:output method="xml"/>
- <xsl:variable name="space" select="' '"/>
- <xsl:param name="autoindent" select="4"/>
- <xsl:template match="text()">
- <xsl:param name="_indent" select="0"/>
+ <xsl:template match="text()"/> <xsl:template match="ppx:pou[ppx:body]|ppx:transition[ppx:body]|ppx:action[ppx:body]">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates select="ppx:body/*[self::ppx:FBD or self::ppx:LD or self::ppx:SFC]/*">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:body/*[self::ppx:FBD or self::ppx:LD or self::ppx:SFC]/*"/> <xsl:template name="add_instance">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:AddBlockInstance($type, @localId, ppx:position/@x, ppx:position/@y, @width, @height)"/>
<xsl:template name="execution_order">
- <xsl:param name="_indent" select="0"/>
<xsl:when test="@executionOrderId">
<xsl:value-of select="@executionOrderId"/>
@@ -29,7 +20,6 @@
<xsl:template name="ConnectionInfos">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="negated"/>
@@ -37,18 +27,13 @@
<xsl:value-of select="ns:AddInstanceConnection($type, $formalParameter, $negated, $edge, ppx:relPosition/@x, ppx:relPosition/@y)"/>
<xsl:template match="ppx:position">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:AddLinkPoint(@x, @y)"/>
<xsl:template match="ppx:connection">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:AddConnectionLink(@refLocalId, @formalParameter)"/>
- <xsl:apply-templates select="ppx:position">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:position"/> <xsl:template match="ppx:connectionPointIn">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="negated"/>
<xsl:param name="formalParameter"/>
@@ -66,12 +51,9 @@
<xsl:value-of select="$formalParameter"/>
- <xsl:apply-templates select="ppx:connection">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connection"/> <xsl:template match="ppx:connectionPointOut">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="negated"/>
<xsl:param name="formalParameter"/>
@@ -91,7 +73,6 @@
<xsl:template match="ppx:connectionPointOutAction">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="ConnectionInfos">
<xsl:with-param name="type">
<xsl:text>output</xsl:text>
@@ -99,7 +80,6 @@
<xsl:template match="ppx:comment">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:SetSpecificValues(ppx:content/xhtml:p/text())"/>
<xsl:call-template name="add_instance">
<xsl:with-param name="type">
@@ -108,7 +88,6 @@
<xsl:template match="ppx:block">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="execution_order">
<xsl:call-template name="execution_order"/>
@@ -120,7 +99,6 @@
<xsl:for-each select="ppx:inputVariables/ppx:variable">
<xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="negated" select="@negated"/>
<xsl:with-param name="edge" select="@edge"/>
<xsl:with-param name="formalParameter" select="@formalParameter"/>
@@ -128,7 +106,6 @@
<xsl:for-each select="ppx:outputVariables/ppx:variable">
<xsl:apply-templates select="ppx:connectionPointOut">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="negated" select="@negated"/>
<xsl:with-param name="edge" select="@edge"/>
<xsl:with-param name="formalParameter" select="@formalParameter"/>
@@ -136,23 +113,18 @@
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="@name"/>
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string">
- <xsl:param name="_indent" select="0"/>
<xsl:text>STRING</xsl:text>
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring">
- <xsl:param name="_indent" select="0"/>
<xsl:text>WSTRING</xsl:text>
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="local-name()"/>
<xsl:template name="VariableBlockInfos">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="expression">
<xsl:value-of select="ppx:expression/text()"/>
@@ -163,14 +135,10 @@
<xsl:text>BOOL</xsl:text>
<xsl:when test="ancestor::ppx:pou[@name=$expression]">
- <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface/ppx:returnType">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface/ppx:returnType"/> - <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface/*/ppx:variable[@name=$expression]/ppx:type">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface/*/ppx:variable[@name=$expression]/ppx:type"/> @@ -184,51 +152,40 @@
<xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="negated" select="@negatedIn"/>
<xsl:with-param name="edge" select="@edgeIn"/>
<xsl:apply-templates select="ppx:connectionPointOut">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="negated" select="@negatedOut"/>
<xsl:with-param name="edge" select="@edgeOut"/>
<xsl:template match="ppx:inVariable">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="VariableBlockInfos">
<xsl:with-param name="type" select="'input'"/>
<xsl:template match="ppx:outVariable">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="VariableBlockInfos">
<xsl:with-param name="type" select="'output'"/>
<xsl:template match="ppx:inOutVariable">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="VariableBlockInfos">
<xsl:with-param name="type" select="'inout'"/>
<xsl:template match="ppx:connector|ppx:continuation">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:SetSpecificValues(@name)"/>
<xsl:call-template name="add_instance">
<xsl:with-param name="type">
<xsl:value-of select="local-name()"/>
- <xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:apply-templates select="ppx:connectionPointOut">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connectionPointIn"/> + <xsl:apply-templates select="ppx:connectionPointOut"/> <xsl:template match="ppx:leftPowerRail|ppx:rightPowerRail">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type" select="local-name()"/>
<xsl:variable name="connectors">
@@ -248,19 +205,14 @@
<xsl:when test="$type='leftPowerRail'">
- <xsl:apply-templates select="ppx:connectionPointOut">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connectionPointOut"/> - <xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connectionPointIn"/> <xsl:template match="ppx:contact|ppx:coil">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type" select="local-name()"/>
<xsl:variable name="storage">
@@ -278,18 +230,12 @@
<xsl:value-of select="$type"/>
- <xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:apply-templates select="ppx:connectionPointOut">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connectionPointIn"/> + <xsl:apply-templates select="ppx:connectionPointOut"/> <xsl:template match="ppx:step">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:SetSpecificValues(@name, @initialStep)"/>
<xsl:apply-templates select="ppx:connectionPointOutAction">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="negated" select="@negated"/>
<xsl:call-template name="add_instance">
@@ -297,15 +243,10 @@
<xsl:value-of select="local-name()"/>
- <xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:apply-templates select="ppx:connectionPointOut">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connectionPointIn"/> + <xsl:apply-templates select="ppx:connectionPointOut"/> <xsl:template match="ppx:transition">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="priority">
<xsl:when test="@priority">
@@ -341,7 +282,6 @@
<xsl:value-of select="ns:SetSpecificValues($priority, $condition_type, $condition)"/>
<xsl:apply-templates select="ppx:condition/ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="negated" select="ppx:condition/@negated"/>
<xsl:call-template name="add_instance">
@@ -349,15 +289,10 @@
<xsl:value-of select="local-name()"/>
- <xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:apply-templates select="ppx:connectionPointOut">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connectionPointIn"/> + <xsl:apply-templates select="ppx:connectionPointOut"/> <xsl:template match="ppx:selectionDivergence|ppx:selectionConvergence|ppx:simultaneousDivergence|ppx:simultaneousConvergence">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type">
<xsl:value-of select="local-name()"/>
@@ -377,15 +312,10 @@
<xsl:value-of select="$type"/>
- <xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:apply-templates select="ppx:connectionPointOut">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connectionPointIn"/> + <xsl:apply-templates select="ppx:connectionPointOut"/> <xsl:template match="ppx:jumpStep">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type">
<xsl:text>jump</xsl:text>
@@ -395,12 +325,9 @@
<xsl:value-of select="$type"/>
- <xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:connectionPointIn"/> <xsl:template match="ppx:action">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type">
<xsl:when test="ppx:reference">
@@ -434,18 +361,14 @@
<xsl:value-of select="ns:AddAction($qualifier, $type, $value, @duration, @indicator)"/>
<xsl:template match="ppx:actionBlock">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:SetSpecificValues()"/>
- <xsl:apply-templates select="ppx:action">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:action"/> <xsl:call-template name="add_instance">
<xsl:with-param name="type">
<xsl:value-of select="local-name()"/>
<xsl:apply-templates select="ppx:connectionPointIn">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="negated" select="@negated"/>
--- a/plcopen/pou_variables.xslt Fri Feb 16 01:38:34 2018 +0100
+++ b/plcopen/pou_variables.xslt Fri Feb 16 01:48:48 2018 +0100
@@ -1,23 +1,11 @@
-<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">
+<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="pou_vars_ns" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="ns" version="1.0" exclude-result-prefixes="ns"> <xsl:output method="xml"/>
- <xsl:variable name="space" select="' '"/>
- <xsl:param name="autoindent" select="4"/>
- <xsl:template match="text()">
- <xsl:param name="_indent" select="0"/>
- <xsl:template mode="var_class" match="text()">
- <xsl:param name="_indent" select="0"/>
- <xsl:template mode="var_type" match="text()">
- <xsl:param name="_indent" select="0"/>
- <xsl:template mode="var_edit" match="text()">
- <xsl:param name="_indent" select="0"/>
- <xsl:template mode="var_debug" match="text()">
- <xsl:param name="_indent" select="0"/>
+ <xsl:template match="text()"/> + <xsl:template mode="var_class" match="text()"/> + <xsl:template mode="var_type" match="text()"/> + <xsl:template mode="var_edit" match="text()"/> + <xsl:template mode="var_debug" match="text()"/> <xsl:variable name="project">
<xsl:copy-of select="document('project')/project/*"/>
@@ -28,7 +16,6 @@
<xsl:copy-of select="document('extensions')/extensions/*"/>
<xsl:template name="add_root">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="class"/>
@@ -40,7 +27,6 @@
<xsl:value-of select="ns:SetRoot($class, $type, $edit, $debug)"/>
<xsl:template match="ppx:pou">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_root">
<xsl:with-param name="class">
<xsl:value-of select="@pouType"/>
@@ -49,37 +35,26 @@
<xsl:value-of select="@name"/>
- <xsl:apply-templates select="ppx:interface">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:apply-templates mode="variable_list" select="ppx:actions/ppx:action | ppx:transitions/ppx:transition">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:interface"/> + <xsl:apply-templates mode="variable_list" select="ppx:actions/ppx:action | ppx:transitions/ppx:transition"/> <xsl:template match="ppx:action">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_root">
<xsl:with-param name="class">
<xsl:text>action</xsl:text>
- <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface"/> <xsl:template match="ppx:transition">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_root">
<xsl:with-param name="class">
<xsl:text>transition</xsl:text>
- <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface"/> <xsl:template match="ppx:configuration">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_root">
<xsl:with-param name="class">
<xsl:text>configuration</xsl:text>
@@ -88,15 +63,10 @@
<xsl:text>false</xsl:text>
- <xsl:apply-templates mode="variable_list" select="ppx:resource">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:apply-templates select="ppx:globalVars">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="variable_list" select="ppx:resource"/> + <xsl:apply-templates select="ppx:globalVars"/> <xsl:template match="ppx:resource">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_root">
<xsl:with-param name="class">
<xsl:text>resource</xsl:text>
@@ -105,45 +75,32 @@
<xsl:text>false</xsl:text>
- <xsl:apply-templates mode="variable_list" select="ppx:pouInstance | ppx:task/ppx:pouInstance">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:apply-templates select="ppx:globalVars">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="variable_list" select="ppx:pouInstance | ppx:task/ppx:pouInstance"/> + <xsl:apply-templates select="ppx:globalVars"/> <xsl:template name="variables_infos">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="var_class"/>
<xsl:for-each select="ppx:variable">
<xsl:variable name="class">
<xsl:apply-templates mode="var_class" select="ppx:type">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:with-param name="default_class">
<xsl:value-of select="$var_class"/>
<xsl:variable name="type">
- <xsl:apply-templates mode="var_type" select="ppx:type">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="ppx:type"/> <xsl:variable name="edit">
- <xsl:apply-templates mode="var_edit" select="ppx:type">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_edit" select="ppx:type"/> <xsl:variable name="debug">
- <xsl:apply-templates mode="var_debug" select="ppx:type">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_debug" select="ppx:type"/> <xsl:value-of select="ns:AddVariable(@name, $class, $type, $edit, $debug)"/>
<xsl:template match="ppx:localVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Local</xsl:text>
@@ -151,7 +108,6 @@
<xsl:template match="ppx:globalVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Global</xsl:text>
@@ -159,7 +115,6 @@
<xsl:template match="ppx:externalVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>External</xsl:text>
@@ -167,7 +122,6 @@
<xsl:template match="ppx:tempVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Temp</xsl:text>
@@ -175,7 +129,6 @@
<xsl:template match="ppx:inputVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Input</xsl:text>
@@ -183,7 +136,6 @@
<xsl:template match="ppx:outputVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Output</xsl:text>
@@ -191,7 +143,6 @@
<xsl:template match="ppx:inOutVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>InOut</xsl:text>
@@ -199,7 +150,6 @@
<xsl:template name="add_variable">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="class"/>
@@ -212,7 +162,6 @@
<xsl:value-of select="ns:AddVariable($name, $class, $type, $edit, $debug)"/>
<xsl:template mode="variable_list" match="ppx:action">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_variable">
<xsl:with-param name="name">
<xsl:value-of select="@name"/>
@@ -223,7 +172,6 @@
<xsl:template mode="variable_list" match="ppx:transition">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_variable">
<xsl:with-param name="name">
<xsl:value-of select="@name"/>
@@ -234,7 +182,6 @@
<xsl:template mode="variable_list" match="ppx:resource">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_variable">
<xsl:with-param name="name">
<xsl:value-of select="@name"/>
@@ -248,7 +195,6 @@
<xsl:template mode="variable_list" match="ppx:pouInstance">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="add_variable">
<xsl:with-param name="name">
<xsl:value-of select="@name"/>
@@ -262,7 +208,6 @@
<xsl:template mode="var_class" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="default_class"/>
<xsl:variable name="type_name" select="@name"/>
<xsl:variable name="pou_infos">
@@ -270,9 +215,7 @@
<xsl:when test="$pou_infos != ''">
- <xsl:apply-templates mode="var_class" select="exsl:node-set($pou_infos)">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_class" select="exsl:node-set($pou_infos)"/> <xsl:value-of select="$default_class"/>
@@ -280,20 +223,16 @@
<xsl:template mode="var_class" match="ppx:pou">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="@pouType"/>
<xsl:template mode="var_class" match="*[self::ppx:type or self::ppx:baseType]/*">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="default_class"/>
<xsl:value-of select="$default_class"/>
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="@name"/>
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:array">
- <xsl:param name="_indent" select="0"/>
<xsl:text>ARRAY [</xsl:text>
<xsl:for-each select="ppx:dimension">
<xsl:value-of select="@lower"/>
@@ -301,24 +240,18 @@
<xsl:value-of select="@upper"/>
<xsl:text>] OF </xsl:text>
- <xsl:apply-templates mode="var_type" select="ppx:baseType">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="ppx:baseType"/> <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:string">
- <xsl:param name="_indent" select="0"/>
<xsl:text>STRING</xsl:text>
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:wstring">
- <xsl:param name="_indent" select="0"/>
<xsl:text>WSTRING</xsl:text>
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/*">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="local-name()"/>
<xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type_name" select="@name"/>
<xsl:variable name="pou_infos">
<xsl:copy-of select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]"/>
@@ -333,26 +266,19 @@
<xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/ppx:array">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates mode="var_edit" select="ppx:baseType">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_edit" select="ppx:baseType"/> <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/*">
- <xsl:param name="_indent" select="0"/>
<xsl:text>false</xsl:text>
<xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type_name" select="@name"/>
<xsl:variable name="datatype_infos">
<xsl:copy-of select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]"/>
<xsl:when test="$datatype_infos != ''">
- <xsl:apply-templates mode="var_debug" select="exsl:node-set($datatype_infos)">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_debug" select="exsl:node-set($datatype_infos)"/> <xsl:text>false</xsl:text>
@@ -360,19 +286,15 @@
<xsl:template mode="var_debug" match="ppx:pou">
- <xsl:param name="_indent" select="0"/>
<xsl:text>true</xsl:text>
<xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/ppx:array">
- <xsl:param name="_indent" select="0"/>
<xsl:text>false</xsl:text>
<xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/ppx:struct">
- <xsl:param name="_indent" select="0"/>
<xsl:text>false</xsl:text>
<xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/*">
- <xsl:param name="_indent" select="0"/>
<xsl:text>true</xsl:text>
--- a/plcopen/variables_infos.xslt Fri Feb 16 01:38:34 2018 +0100
+++ b/plcopen/variables_infos.xslt Fri Feb 16 01:48:48 2018 +0100
@@ -1,12 +1,8 @@
-<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="var_infos_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">
+<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"> <xsl:output method="xml"/>
- <xsl:variable name="space" select="' '"/>
- <xsl:param name="autoindent" select="4"/>
- <xsl:template match="text()">
- <xsl:param name="_indent" select="0"/>
+ <xsl:template match="text()"/> <xsl:variable name="project">
<xsl:copy-of select="document('project')/project/*"/>
@@ -17,32 +13,19 @@
<xsl:copy-of select="document('extensions')/extensions/*"/>
<xsl:template match="ppx:configuration">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates select="ppx:globalVars">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:globalVars"/> <xsl:template match="ppx:resource">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates select="ppx:globalVars">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:globalVars"/> <xsl:template match="ppx:pou">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates select="ppx:interface/*">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:interface/*"/> <xsl:template match="ppx:returnType">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="ns:AddTree()"/>
- <xsl:apply-templates mode="var_type" select=".">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="."/> <xsl:template name="variables_infos">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="var_class"/>
<xsl:variable name="var_option">
@@ -59,9 +42,7 @@
<xsl:for-each select="ppx:variable">
<xsl:variable name="initial_value">
- <xsl:apply-templates select="ppx:initialValue">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="ppx:initialValue"/> <xsl:variable name="edit">
@@ -69,21 +50,16 @@
<xsl:text>true</xsl:text>
- <xsl:apply-templates mode="var_edit" select="ppx:type">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_edit" select="ppx:type"/> <xsl:value-of select="ns:AddTree()"/>
- <xsl:apply-templates mode="var_type" select="ppx:type">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="ppx:type"/> <xsl:value-of select="ns:AddVariable(@name, $var_class, $var_option, @address, $initial_value, $edit, ppx:documentation/xhtml:p/text())"/>
<xsl:template match="ppx:localVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Local</xsl:text>
@@ -91,7 +67,6 @@
<xsl:template match="ppx:globalVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Global</xsl:text>
@@ -99,7 +74,6 @@
<xsl:template match="ppx:externalVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>External</xsl:text>
@@ -107,7 +81,6 @@
<xsl:template match="ppx:tempVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Temp</xsl:text>
@@ -115,7 +88,6 @@
<xsl:template match="ppx:inputVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Input</xsl:text>
@@ -123,7 +95,6 @@
<xsl:template match="ppx:outputVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>Output</xsl:text>
@@ -131,7 +102,6 @@
<xsl:template match="ppx:inOutVars">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="variables_infos">
<xsl:with-param name="var_class">
<xsl:text>InOut</xsl:text>
@@ -139,53 +109,35 @@
<xsl:template mode="var_type" match="ppx:pou">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates mode="var_type" select="ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable"/> <xsl:template mode="var_type" match="ppx:variable">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="name">
<xsl:value-of select="@name"/>
<xsl:value-of select="ns:AddTree()"/>
- <xsl:apply-templates mode="var_type" select="ppx:type">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="ppx:type"/> <xsl:value-of select="ns:AddVarToTree($name)"/>
<xsl:template mode="var_type" match="ppx:dataType">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates mode="var_type" select="ppx:baseType">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="ppx:baseType"/> <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates mode="var_type" select="ppx:variable">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="ppx:variable"/> <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type_name">
<xsl:value-of select="@name"/>
<xsl:when test="$tree='True'">
- <xsl:apply-templates mode="var_type" select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]"/> <xsl:value-of select="ns:SetType($type_name)"/>
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array">
- <xsl:param name="_indent" select="0"/>
- <xsl:apply-templates mode="var_type" select="ppx:baseType">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates mode="var_type" select="ppx:baseType"/> <xsl:for-each select="ppx:dimension">
<xsl:variable name="lower">
<xsl:value-of select="@lower"/>
@@ -197,28 +149,24 @@
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="name">
<xsl:text>STRING</xsl:text>
<xsl:value-of select="ns:SetType($name)"/>
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="name">
<xsl:text>WSTRING</xsl:text>
<xsl:value-of select="ns:SetType($name)"/>
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="name">
<xsl:value-of select="local-name()"/>
<xsl:value-of select="ns:SetType($name)"/>
<xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
- <xsl:param name="_indent" select="0"/>
<xsl:variable name="type_name">
<xsl:value-of select="@name"/>
@@ -235,47 +183,35 @@
<xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
- <xsl:param name="_indent" select="0"/>
<xsl:text>true</xsl:text>
<xsl:template match="ppx:value">
- <xsl:param name="_indent" select="0"/>
<xsl:when test="@repetitionValue">
<xsl:value-of select="@repetitionValue"/>
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:when test="@member">
<xsl:value-of select="@member"/>
<xsl:text> := </xsl:text>
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:template match="ppx:simpleValue">
- <xsl:param name="_indent" select="0"/>
<xsl:value-of select="@value"/>
<xsl:template name="complex_type_value">
- <xsl:param name="_indent" select="0"/>
<xsl:param name="start_bracket"/>
<xsl:param name="end_bracket"/>
<xsl:value-of select="$start_bracket"/>
<xsl:for-each select="ppx:value">
- <xsl:apply-templates select=".">
- <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
+ <xsl:apply-templates select="."/> <xsl:when test="position()!=last()">
@@ -285,7 +221,6 @@
<xsl:value-of select="$end_bracket"/>
<xsl:template match="ppx:arrayValue">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="complex_type_value">
<xsl:with-param name="start_bracket">
@@ -296,7 +231,6 @@
<xsl:template match="ppx:structValue">
- <xsl:param name="_indent" select="0"/>
<xsl:call-template name="complex_type_value">
<xsl:with-param name="start_bracket">