--- a/PLCControler.py Wed Oct 16 11:36:22 2013 +0200
+++ b/PLCControler.py Wed Oct 16 23:54:44 2013 +0200
@@ -270,7 +270,6 @@
self.TagName = self.Controller.ComputeConfigurationResourceName(args[0][0], args[1][0])
def PouTagName(self, context, *args):
- #print "PouTagName", etree.tostring(args[0][0])
self.TagName = self.Controller.ComputePouName(args[0][0])
def ActionTagName(self, context, *args):
@@ -1323,8 +1322,7 @@
factory = VariablesInfosFactory(variables)
parser = etree.XMLParser()
- parser.resolvers.add(LibraryResolver(self, debug))
+ parser.resolvers.add(LibraryResolver(self, debug)) variables_infos_xslt_tree = etree.XSLT(
--- a/plcopen/variables_infos.xslt Wed Oct 16 11:36:22 2013 +0200
+++ b/plcopen/variables_infos.xslt Wed Oct 16 23:54:44 2013 +0200
@@ -8,25 +8,13 @@
<xsl:param name="_indent" select="0"/>
<xsl:variable name="project">
- <xsl:when test="$tree='True'">
- <xsl:copy-of select="document('project')/project/*"/>
+ <xsl:copy-of select="document('project')/project/*"/> <xsl:variable name="stdlib">
- <xsl:when test="$tree='True'">
- <xsl:copy-of select="document('stdlib')/stdlib/*"/>
+ <xsl:copy-of select="document('stdlib')/stdlib/*"/> <xsl:variable name="extensions">
- <xsl:when test="$tree='True'">
- <xsl:copy-of select="document('extensions')/extensions/*"/>
+ <xsl:copy-of select="document('extensions')/extensions/*"/> <xsl:template match="ppx:configuration">
<xsl:param name="_indent" select="0"/>
@@ -161,7 +149,7 @@
<xsl:variable name="name">
<xsl:value-of select="@name"/>
- <xsl:value-of select="ns:AddTree($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"/>
@@ -199,7 +187,13 @@
<xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
<xsl:for-each select="ppx:dimension">
- <xsl:value-of select="ns:AddDimension(@lower, @upper)"/>
+ <xsl:variable name="lower"> + <xsl:value-of select="@lower"/> + <xsl:variable name="upper"> + <xsl:value-of select="@upper"/> + <xsl:value-of select="ns:AddDimension($lower, $upper)"/> <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string">
@@ -225,7 +219,9 @@
<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" select="@name"/>
+ <xsl:variable name="type_name"> + <xsl:value-of 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] | exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]"/>
--- a/plcopen/variables_infos.ysl2 Wed Oct 16 11:36:22 2013 +0200
+++ b/plcopen/variables_infos.ysl2 Wed Oct 16 23:54:44 2013 +0200
@@ -10,26 +10,14 @@
- copy "document('project')/project/*";
+ copy "document('project')/project/*";
- copy "document('stdlib')/stdlib/*";
+ copy "document('stdlib')/stdlib/*";
- copy "document('extensions')/extensions/*";
+ copy "document('extensions')/extensions/*"; template "ppx:configuration" {
@@ -124,7 +112,7 @@
template "ppx:variable", mode="var_type" {
variable "name" > «@name»
- value "ns:AddTree($name)";
apply "ppx:type", mode="var_type";
value "ns:AddVarToTree($name)";
@@ -155,7 +143,9 @@
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array", mode="var_type" {
apply "ppx:baseType", mode="var_type";
foreach "ppx:dimension" {
- value "ns:AddDimension(@lower, @upper)";
+ variable "lower" > «@lower» + variable "upper" > «@upper» + value "ns:AddDimension($lower, $upper)"; @@ -175,7 +165,7 @@
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived", mode="var_edit" {
- variable "type_name", "@name";
+ variable "type_name" > «@name» copy """exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |
exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |