plcopen/instances_path.xslt
changeset 2626 39d78c530cbb
parent 1949 c266fbaae0f6
child 3801 6839dbb9a1df
--- a/plcopen/instances_path.xslt	Sun Jul 14 08:43:12 2019 +0200
+++ b/plcopen/instances_path.xslt	Tue Sep 24 11:55:59 2019 +0200
@@ -62,9 +62,9 @@
     </xsl:apply-templates>
   </xsl:template>
   <xsl:template match="ppx:dataType">
-    <xsl:param name="instance_path"/>
+    <xsl:param name="instance_path" select="concat('#',@name)"/>
     <xsl:apply-templates select="ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
-      <xsl:with-param name="parent_path">
+      <xsl:with-param name="variable_path">
         <xsl:value-of select="$instance_path"/>
       </xsl:with-param>
     </xsl:apply-templates>
@@ -108,12 +108,12 @@
         <xsl:text>.</xsl:text>
         <xsl:value-of select="@name"/>
       </xsl:variable>
+      <xsl:apply-templates select="ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
+        <xsl:with-param name="variable_path">
+          <xsl:value-of select="$element_path"/>
+        </xsl:with-param>
+      </xsl:apply-templates>
     </xsl:for-each>
-    <xsl:apply-templates select="ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]">
-      <xsl:with-param name="variable_path">
-        <xsl:value-of select="$element_path"/>
-      </xsl:with-param>
-    </xsl:apply-templates>
   </xsl:template>
   <xsl:template match="ppx:array">
     <xsl:param name="variable_path"/>