--- a/plcopen/pou_block_instances.xslt Mon Oct 16 23:35:47 2023 +0200
+++ b/plcopen/pou_block_instances.xslt Mon Oct 16 23:50:58 2023 +0200
@@ -2,7 +2,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:regexp="http://exslt.org/regular-expressions" xmlns:str="http://exslt.org/strings" xmlns:func="http://exslt.org/functions" xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ns="beremiz" version="1.0" extension-element-prefixes="ns" exclude-result-prefixes="ns">
<xsl:output method="xml"/>
<xsl:template match="text()"/>
- <xsl:template priority="-1.0" match="ppx:pou[ppx:body]|ppx:transition[ppx:body]|ppx:action[ppx:body]">
+ <xsl:template match="ppx:pou[ppx:body]|ppx:transition[ppx:body]|ppx:action[ppx:body]"> <xsl:apply-templates select="ppx:body/*[self::ppx:FBD or self::ppx:LD or self::ppx:SFC]/*"/>
<xsl:template name="add_instance">
--- a/plcopen/pou_block_instances.ysl2 Mon Oct 16 23:35:47 2023 +0200
+++ b/plcopen/pou_block_instances.ysl2 Mon Oct 16 23:50:58 2023 +0200
@@ -7,7 +7,7 @@
- template "ppx:pou[ppx:body]|ppx:transition[ppx:body]|ppx:action[ppx:body]", priority="-1.0" {
+ template "ppx:pou[ppx:body]|ppx:transition[ppx:body]|ppx:action[ppx:body]" { apply "ppx:body/*[self::ppx:FBD or self::ppx:LD or self::ppx:SFC]/*";
--- a/plcopen/pou_variables.xslt Mon Oct 16 23:35:47 2023 +0200
+++ b/plcopen/pou_variables.xslt Mon Oct 16 23:50:58 2023 +0200
@@ -202,6 +202,10 @@
+ <xsl:template mode="var_class" match="*[self::ppx:type or self::ppx:baseType]/*"> + <xsl:param name="default_class"/> + <xsl:value-of select="$default_class"/> <xsl:template mode="var_class" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
<xsl:param name="default_class"/>
<xsl:variable name="type_name" select="@name"/>
@@ -218,9 +222,8 @@
<xsl:template mode="var_class" match="ppx:pou">
<xsl:value-of select="@pouType"/>
- <xsl:template mode="var_class" priority="-1.0" match="*[self::ppx:type or self::ppx:baseType]/*">
- <xsl:param name="default_class"/>
- <xsl:value-of select="$default_class"/>
+ <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/*"> + <xsl:value-of select="local-name()"/> <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
<xsl:value-of select="@name"/>
@@ -241,8 +244,8 @@
<xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType]/ppx:wstring">
<xsl:text>WSTRING</xsl:text>
- <xsl:template mode="var_type" priority="-1.0" match="*[self::ppx:type or self::ppx:baseType]/*">
- <xsl:value-of select="local-name()"/>
+ <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/*"> + <xsl:text>false</xsl:text> <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
<xsl:variable name="type_name" select="@name"/>
@@ -259,8 +262,8 @@
<xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType]/ppx:array">
<xsl:apply-templates mode="var_edit" select="ppx:baseType"/>
- <xsl:template mode="var_edit" priority="-1.0" match="*[self::ppx:type or self::ppx:baseType]/*">
- <xsl:text>false</xsl:text>
+ <xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/*"> + <xsl:text>true</xsl:text> <xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/ppx:derived">
<xsl:variable name="type_name" select="@name"/>
@@ -283,7 +286,4 @@
<xsl:template mode="var_debug" match="*[self::ppx:type or self::ppx:baseType]/ppx:struct">
<xsl:text>false</xsl:text>
- <xsl:template mode="var_debug" priority="-1.0" match="*[self::ppx:type or self::ppx:baseType]/*">
- <xsl:text>true</xsl:text>
--- a/plcopen/pou_variables.ysl2 Mon Oct 16 23:35:47 2023 +0200
+++ b/plcopen/pou_variables.ysl2 Mon Oct 16 23:50:58 2023 +0200
@@ -170,6 +170,11 @@
+ template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_class" { + value "$default_class"; template "*[self::ppx:type or self::ppx:baseType]/ppx:derived", mode="var_class" {
variable "type_name", "@name";
@@ -188,11 +193,10 @@
- template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_class", priority="-1.0" {
- value "$default_class";
+ template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_type" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:derived", mode="var_type" {
@@ -214,8 +218,8 @@
- template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_type", priority="-1.0" {
+ template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_edit" { template "*[self::ppx:type or self::ppx:baseType]/ppx:derived", mode="var_edit" {
@@ -231,8 +235,8 @@
apply "ppx:baseType", mode="var_edit";
- template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_edit", priority="-1.0" {
+ template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_debug" { template "*[self::ppx:type or self::ppx:baseType]/ppx:derived", mode="var_debug" {
@@ -261,8 +265,4 @@
- template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_debug", priority="-1.0" {
--- a/plcopen/variables_infos.xslt Mon Oct 16 23:35:47 2023 +0200
+++ b/plcopen/variables_infos.xslt Mon Oct 16 23:50:58 2023 +0200
@@ -117,6 +117,12 @@
<xsl:template mode="var_type" match="ppx:dataType">
<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]/*"> + <xsl:variable name="name"> + <xsl:value-of select="local-name()"/> + <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:struct">
<xsl:apply-templates mode="var_type" select="ppx:variable"/>
@@ -155,12 +161,6 @@
<xsl:value-of select="ns:SetType($name)"/>
- <xsl:template mode="var_type" priority="-1.0" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
- <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:variable name="type_name">
<xsl:value-of select="@name"/>
--- a/plcopen/variables_infos.ysl2 Mon Oct 16 23:35:47 2023 +0200
+++ b/plcopen/variables_infos.ysl2 Mon Oct 16 23:50:58 2023 +0200
@@ -117,6 +117,11 @@
template "ppx:dataType", mode="var_type" {
apply "ppx:baseType", mode="var_type";
+ template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*", mode="var_type" { + variable "name" > «local-name()» + value "ns:SetType($name)"; template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct", mode="var_type" {
apply "ppx:variable", mode="var_type";
@@ -152,10 +157,6 @@
value "ns:SetType($name)";
- template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*", mode="var_type", priority="-1.0" {
- variable "name" > «local-name()»
- value "ns:SetType($name)";
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived", mode="var_edit" {
variable "type_name" > «@name»